Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node terminal readline console

before executing the command node in terminal you have to install
  :~$ npm install prompt-sync
if you havent already.
then inside node
  >const prompt = require('prompt-sync')();
  >name = prompt('What is your name? '); michael
  >console.log(`Hey there ${name}`);
Hey there michael
Source by www.codecademy.com #
 
PREVIOUS NEXT
Tagged: #node #terminal #readline #console
ADD COMMENT
Topic
Name
6+4 =