Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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}`);
Source by www.codecademy.com #
 
PREVIOUS NEXT
Tagged: #user #input #node #js
ADD COMMENT
Topic
Name
4+5 =