¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
Proyecto viajes módulo 13
Alguien me ayuda con el último ejercicio para terminar el módulo? Ni sé porqué pone un parseInt en el código. Desde ya gracias!
1 Respuesta
+ 1
I guess you mean the Trip Planner under Basic Concepts of the JavaScript course.
You're referring to this line, right?
var distance = parseInt(readLine(), 10);
parseInt is there to convert a string to a number.
You can't do math with strings but you can with numbers.
If you want a big hint with the math, see below:
* 60 / 40
If you need to print, use console.log.