It is showing prompt function is not defined what should i do

Question:

Current behavior:

Desired behavior

Repl link:

code snippet

Hi @yogeshtribhuvan , welcome to the forums!
This was an update, so you’ll need to use the prompt-sync library.

const prompt = require('prompt-sync')()
prompt('Enter your name: ')

Hope this helps!

1 Like