Answers for "readline node js"

7

readline in javascript

//Node.js readline
const readline = require('readline');

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

rl.question('What do you think of Node.js? ', (answer) => {
  console.log(`Thank you for your valuable feedback: ${answer}`);
  rl.close();
});
Posted by: Guest on June-06-2020
1

readline node js

readline = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
})

readline.on("line", (line) => {
    if (line === "") {
        // Code
    }
    else if (line === "") {
        // Code
    }
})
Posted by: Guest on July-22-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language