Answers for "getting user input from a form with node js"

2

getting user input in node js

//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}`);
Posted by: Guest on December-20-2021
0

how to take input from user nodejs

const prompt = require("prompt-sync")();

const input = prompt("What is your name? ");

console.log(`Oh, so your name is ${input}`);
Posted by: Guest on December-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language