Error using prompts to get input in Node.js

Problem description

When I use prompt functions in js it return error in
Output

Expected behavior

“prompt” function should use to get input from the user

Actual behavior

But it return error while executing the js

Steps to reproduce

It gives error while using the prompt function

Browser

App

OS

Android

Device if mobile

Android

Plan

Free tier

Hello @sundarmukhiyask, welcome to Replit Ask!

The prompt function is for VanillaJS, not for NodeJS.

Note: Please change the tags to Code Help.

2 Likes

Hey @sundarmukhiyask!

Could you try this?

2 Likes

Yes I have tried
It’s working fine
Thank you :blush:

Please change the post that was marked as solution to the above post instead.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.