0
AMATEUR, JS
ok bros, i am just startin in js i don have a idea for this...I need to do a function that converts the miles into hours and the hours into minutes i tried this: function main(){ var distance=parseInt(readLine(),10) //your code goes here var hours=distance/40, var minutes=hours*60 } console.log(main()); And this function main(){ var distance=parseInt(readLine(),10) //your code goes here var hours=distance/40, var minutes=60, var result=hours*minuts; } console.log(main()); well, nothing comes to mind.. please dont kill me
1 Resposta
+ 3
40 is speed?
You console log function result, so you need to add return statement in your function.