0

How to how to get the inputs and outputs?

The JavaScript quiz 2 project is the get time from a vehicle moving 40mph. I know I need to create a formula using the input /40 for time in hours*60 for the time in minutes. How do I write the output? Document.write and console.writeline don’t seem to work. Did I miss something? Also does the randomized input just go in a blank spot?

27th Jan 2021, 2:44 AM
Johnathan Fleischer
Johnathan Fleischer - avatar
2 odpowiedzi
+ 2
The supplied code already gets the input for you by using readline(), and stores the integer input value in the distance variable. Use the distance variable to calculate the time, just as you described. To print the output use console.log().
27th Jan 2021, 4:07 AM
Brian
Brian - avatar
+ 1
thank you so much! thats what i was missing.
27th Jan 2021, 4:37 AM
Johnathan Fleischer
Johnathan Fleischer - avatar