+ 1
"Trip Planner" in JS isn't accepting my code, can anyone help?
"Trip Planner" in JS isn't accepting my code. Here is my code => function main() { var distance = parseInt(readline(), 10); var speed = 40; var time = distance/speed; var ans = time*60; console.log(ans); return; } main()
1 Answer
+ 11
L should be uppercase in readLine()
No need to call main() since it's done by compiler itself
function main() {
var distance = parseInt(readLine(), 10);
var speed = 40;
var time = distance/speed;
var ans = time*60;
console.log(ans);
// return;
}
//main()