- 1

Please can someone help me out with the trip planner is n JavaScript

13th Feb 2021, 2:42 AM
Francis Chukwudi
Francis Chukwudi - avatar
4 odpowiedzi
+ 1
function main() { var distance = parseInt(readLine(), 10); var speed = 40 var time = 60 //your code goes here console.log(distance/speed*time); }
30th Mar 2021, 2:40 PM
Deepesh V
Deepesh V - avatar
0
hi Francis Chukwudi We could help but we need more to go off like what is your specific issue or your code? is it an error or something else? also if your having an issue printing the result to the screen try using console.log() to output the result
13th Feb 2021, 3:10 AM
Ollie Q
Ollie Q - avatar
0
I was giving 40 miles per hour how to convert it to minutes Am doing a trip planner
13th Feb 2021, 6:22 PM
Francis Chukwudi
Francis Chukwudi - avatar
0
the math: r = distance/40 gives you the how long it takes to travel a mile r*60 converts it to minutes
13th Feb 2021, 7:18 PM
Ollie Q
Ollie Q - avatar