Published
- 1 min read
getting user input in node js
The solution for this is noted below
getting user input in node js
Solution
//Make sure you have Node and NPM installed
//Run "npm install prompt-sync" in the terminal
const prompt = require('prompt-sync')()
const name = prompt('What is your name?')
console.log(`Hey there ${name}`)
Try other methods by searching on the site. That is if this doesn’t work