UNPKG

greetings_by_imadityagolu

Version:

greet using node js

16 lines (13 loc) 374 B
const readline = require("readline"); const { stdin, stdout } = require("process"); const greetings = () => { const r1 = readline.createInterface({ input: stdin, output: stdout, }); r1.question("Type your name?\n", (answer) => { console.log(`\nHello ${answer} welcome to Adityas npm package`); r1.close(); }); } module.exports = greetings;