can you plz solve first challenge of JavaScript i did not understand the road trip challenge because it is not letting console how to print plz help me
1/23/2022 4:18:34 PM
Waqar Ahmad Khan12 Answers
New AnswerClear your basic fundamentals then you will know everything about it. Here is your code: function main() { var distance = parseInt(readLine(), 10); //your code goes here var minutes = distance /40*60; console.log(minutes) } /// # Note: You need to read the code, too!
function main() { var distance = 40; parseInt(readLine(), 10); //your code goes here var miles = 150; var result = (miles / distance); }
You need to plan a road trip. You are traveling at an average speed of 40 miles an hour. Given a distance in miles as input (the code to take input is already present), output to the console the time it will take you to cover it in minutes. Sample Input: 150 Sample Output: 225
Explanation: It will take 150/40 = 3.75 hours to cover the distance, which is equivalent to 3.75*60 = 225 minutes
function main() { var distance = parseInt(readLine(), 10); //your code goes here }
π₯π ³π ΄π ππ ·π Έπ π ½π °π ½π ³π °π ½ π Όπ Έππ ·ππ °π₯ thank you so much brother clear ha
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message