0

Can't pass Node.js practice

Open JavaScript practice, first task with node.js. I can't pass user's input 'coz it is always NaN. I already solved it on my computer with "readline" module, but can't do it on SoloLearn. Please help me.

13th Feb 2021, 10:56 PM
Boris Bedrenko
Boris Bedrenko - avatar
5 Respostas
+ 2
Boris big sale is pro one , i can tell about trip planner function main() { var distance = parseInt(readLine(), 10); //your code goes here var hours=distance/40; console.log(hours*60) }
14th Feb 2021, 8:06 AM
Abhay
Abhay - avatar
+ 2
Yes but here the program itself calls main
14th Feb 2021, 5:10 PM
Abhay
Abhay - avatar
+ 1
Trip planner?
13th Feb 2021, 11:04 PM
Abhay
Abhay - avatar
+ 1
Abhay, ty wm! The problem was with function main. For any function to do something you need to run it - main(); But in this case it caused only problems.
14th Feb 2021, 5:09 PM
Boris Bedrenko
Boris Bedrenko - avatar
0
Abhay, yes. And "Big sale" also.
14th Feb 2021, 7:19 AM
Boris Bedrenko
Boris Bedrenko - avatar