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?
2 Answers
+ 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().
+ 1
thank you so much! thats what i was missing.