0

[URGENT] Hello, facing problems in vscode. Trying to run a JavaScript code but prompt() giving me error.

30th Jan 2021, 12:12 PM
PRINCE TAWIAH
PRINCE TAWIAH - avatar
4 ответов
0
Something like; Let num = 5; console.log(num(prompt("This is num")); Running code in vscode terminal.
30th Jan 2021, 12:27 PM
PRINCE TAWIAH
PRINCE TAWIAH - avatar
0
Getting error "prompt is not defined"
30th Jan 2021, 12:29 PM
PRINCE TAWIAH
PRINCE TAWIAH - avatar
0
Sorry, the reason for the error I received was because neither terminal nor node.js contains the prompt(); which I think might be some function. It is rather accessible on a browser; prompt() loads some popup window stating the embedded info and maybe provide a text box like in the code description I gave, to receive input.
30th Jan 2021, 3:17 PM
PRINCE TAWIAH
PRINCE TAWIAH - avatar
0
The code i was trying to run was a very useless one; just trying to see how things work
30th Jan 2021, 3:17 PM
PRINCE TAWIAH
PRINCE TAWIAH - avatar