- 1
Why I get only NaN as output - greenhorn needs help
//route planer function main() { var distance = parseInt(readLine(),590); //your code goes here var hour_tour = distance / 40; var min_route = hour_tour * 60; console.log (min_route); } Thank you
3 Antworten
+ 2
why did you have modified the second argument of parseInt?
it should be stick to 10, not 590 (invalid base so that's why you get NaN as input and therefore NaN with any calculation ;P)
+ 1
What is "590"?? It should be 10 .
And please use language name as tag .
0
thank you very much 👍