Confused in js | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Confused in js

You need to plan a road trip. You are traveling at an average speed of 40 miles an hour. Given a distance in miles as input (the code to take input is already present), output to the console the time it will take you to cover it in minutes. Sample Input: 150 Sample Output: 225 function main() { var distance = parseInt(readLine(), 10); //your code goes here var distance = 590 var speed= 40 var minutes = distance/speed console.log(minutes * 60) } Where did the 590 come from

4th Apr 2021, 12:46 PM
Samuel Okey
1 Answer
0
is it about commenting lesson? I think you need to make this program to work according to description.. So comment that line.
4th Apr 2021, 12:59 PM
Jayakrishna 🇮🇳