+ 9

Can Node.js code playground take an input to execute the function?

Is it possible to take user input like an integer with the node.js code playground of sololearn and execute a certain function? I tried this, it didn't work https://code.sololearn.com/c8BV1Qg6ttdd/?ref=app I mean it is a console like other console in sl right?, python console etc

2nd Jan 2022, 3:52 PM
ShadowCipher
ShadowCipher - avatar
7 odpowiedzi
+ 8
When using Sololearn app, the problem is readline.question() returns nothing. I suggest using the on() method with the line event. readlline.on('line', callback) https://code.sololearn.com/c5I5Nl4rdy1E/#node
3rd Jan 2022, 3:43 AM
ODLNT
ODLNT - avatar
+ 6
https://www.sololearn.com/Discuss/2748550/?ref=app
2nd Jan 2022, 4:07 PM
Simba
Simba - avatar
+ 3
Thank You Simba, I also found the same thing, I'm working on how i can integrate it with my code above. If you have approach to do it, i will appreciate that 💯 https://code.sololearn.com/c1o0qkmGaVjr/?ref=app
2nd Jan 2022, 4:12 PM
ShadowCipher
ShadowCipher - avatar
+ 3
So far I'm here, anyone who can tell me why I'm getting this weird array instead of an array with values increased by a number input? https://code.sololearn.com/cvD4kuoyTV1w/?ref=app
2nd Jan 2022, 5:23 PM
ShadowCipher
ShadowCipher - avatar
+ 3
https://replit.com/@joyahmed007/Input-with-ReadLine#index.js
3rd Jan 2022, 2:40 AM
JOY
JOY - avatar
+ 3
Thank you ODLNT , this was problem
3rd Jan 2022, 4:30 AM
ShadowCipher
ShadowCipher - avatar
+ 2
Thanks JOY 🤜🤛
3rd Jan 2022, 4:33 AM
ShadowCipher
ShadowCipher - avatar