+ 2
please Help me,.. parseInt(readLine(), 10) //I dont Understand this function
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 Given Code: function () { var distance = parseInt(readLine(), 10); //your code goes here }
1 ответ
+ 2
readline function is an node js module, which is used to take input, and the function parseInt will convert the input into an integer, suppose the input is 6.78 then it will give 6 only.
In this challenge you've no need to edit this function, or you've no need to do anything to take input, this input is comes from test cases, you only need you write your logic, and log the result to the console.
Happy Coding :)