0

When I use msg = readLine(); just as says at JS course in my pc navigator it doesn't recognize it, any idea of why?

5th Apr 2023, 8:23 PM
Gabe
3 Respuestas
+ 3
For front-end browser based script (Javascript) inputs are read using prompt() https://developer.mozilla.org/en-US/docs/Web/API/Window/prompt For back-end script (node.js) there is something similar https://nodejs.org/api/readline.html but this I guess is only feasible when running through console.
5th Apr 2023, 9:45 PM
Ipang
+ 2
I am studying JS, and I meant when I tried on Chrome with my pc, in a file apart from the sololearn simulator
5th Apr 2023, 9:39 PM
Gabe
+ 1
Are you studying JS or node.js? these two have different ways for obtaining inputs. What did you mean by "PC navigator"?
5th Apr 2023, 9:35 PM
Ipang