+ 3
Help me please.
What's wrong with my code that SoloLearn doesn't admit it for the JS Trip planner challenge? const distance = Number(prompt()); const main = function () { let time = distance /40 * 60; return time; }; const timeInMinute = main(); console.log(timeInMinute); It's properly working on ma computer, but not in here!
3 odpowiedzi
+ 1
Saleh Ghazimoradi don't worry about Node.js syntax.
Node.js is a JavaScript runtime environment that executes JavaScript code outside of a web browser.
In Javascript course module, you won't need to write the Node.js syntax. If some Node.js syntax is required, then it will be already available in the code tab of challenge.
You just need to write the javascript logic below the //your code goes here comment line.
+ 4
The code tab in trip planner challenge uses Nodejs to test your code.
Using Number(prompt()) might not work.
This code might help you.
function main() {
var distance = parseInt(readLine(), 10);
//your code goes here
const speed = 40
const time = distance/speed
const timeInMinutes = time * 60
console.log(timeInMinutes)
}
+ 3
Art1mis Thank ya pal. 🙏🌹🌹🌹🙏
What if a person doesn't know Node.js!
It doesn't make sense at all.
I have no idea how I must handle the challenges to get ma new certification. 😒