readLine() what does this do in this code

x = (score) => {
score = parseInt(readLine(), 10)
return score >= 88 ? "excellent" : (score <= 87 && score >=40) ? "good": "fail";
}
console.log(x())
x = (score) => {
score = parseInt(readLine(), 10)
return score >= 88 ? "excellent" : (score <= 87 && score >=40) ? "good": "fail";
}
console.log(x())
7 Replies
chrono1913
chrono1913OP2y ago
i look through the internet and its not giving an answer i can understand please help is readLine() a react function
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Jochem
Jochem2y ago
not something you can use in a browser usually if you want text input from a user, you can use prompt() or a text input element
chrono1913
chrono1913OP2y ago
so when you parseInt() <——————the value has to be an int the second argument is a redix but the readLIne() i really dont know what it does this was in a practice test but gave me incorrect bc i didnt add that part with the readLine() otherwise function works ust fine
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
chrono1913
chrono1913OP2y ago
readlines is used to read all the lines in a file into a list in python correct?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server