Search
 
SCRIPT & CODE EXAMPLE
 

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()
})
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript date set hours minutes seconds to 0 
Javascript :: joi allow additional properties 
Javascript :: react native make safe view in mobile 
Javascript :: dom queryselector 
Javascript :: check if every value in array is equal 
Javascript :: How to reset ReactJS file input 
Javascript :: how to get a due date from current date in javascript 
Javascript :: clearing setinterval 
Javascript :: moment to date object 
Javascript :: divider in react native 
Javascript :: remove the first item from an array 
Javascript :: how to make a check if 50% of letters are capital in discord js 
Javascript :: feet to mile js 
Javascript :: sequelize raw query 
Javascript :: javascript press tab key 
Javascript :: javascript on scroll change nav color 
Javascript :: javascript change right click menu 
Javascript :: how to make first letter uppercase in javascript 
Javascript :: vuejs set default value for prop 
Javascript :: black adam 
Javascript :: react 18 rendering twice 
Javascript :: array of array key value javascript 
Javascript :: using arrow function and destructuring 
Javascript :: jquery remove elemtns 
Javascript :: how to get every index of array in javascript 
Javascript :: supertest express check response 
Javascript :: upload and send file to axios multipart 
Javascript :: nebular loader 
Javascript :: js filter array of objects by another object 
Javascript :: promise in javascript 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =