"readLine" and "parseInt" are they frontend or backend | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

"readLine" and "parseInt" are they frontend or backend

13th Oct 2021, 6:21 AM
Immaculate Prince
Immaculate Prince - avatar
2 Answers
+ 2
Neither frontend nor backend both are function of JavaScript. readLine is a function in Node JS which is used to take user input. parseInt is a function which is used to parse user input to integer. readLine by default returns string so if you want to take number then you have to use parseInt var num = parseInt(readLine())
13th Oct 2021, 8:37 AM
A͢J
A͢J - avatar
+ 1
They're ain't actually associated to anything but readline is a nodejs inbuilt module for taking input (only limited to nodejs) however parseInt works on both browser & nodejs.
13th Oct 2021, 8:01 AM
zexu knub
zexu knub - avatar