get input in terminal nodejs
const readline = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
readline.question('Who are you?', name => {
console.log(`Hey there ${name}!`);
readline.close();
});
get input in terminal nodejs
const readline = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
readline.question('Who are you?', name => {
console.log(`Hey there ${name}!`);
readline.close();
});
input in node js
const readline = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
readline.question('who are you: ', name => {
console.log(`hello, hi there ${name}`);
readline.close();
})
how to get input from user in nodejs
const readline = require('readline').createInterface({ input: process.stdin, output: process.stdout}); readline.question('Who are you?', name => { console.log(`Hey there ${name}!`); readline.close();});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us