Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript read consol input

const readline = require('readline')

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
})

rl.question('What is your name?', nameAnswer => {
  console.log(`Nice to meet you, ${nameAnswer}.`);
  rl.close()
})
 
PREVIOUS NEXT
Tagged: #javascript #read #consol #input
ADD COMMENT
Topic
Name
2+7 =