Commit f96d1d0c authored by amonsiri unkham's avatar amonsiri unkham

give me one point

parents
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
prompt: 'สวัสดีคุณ'
});
rl.prompt();
rl.on('line', (line) => {
switch (line.trim()) {
case 'hello':
console.log('world!');
break;
default:
console.log(`สวัสดีคุณ '${line.trim()}'`);
break;
}
rl.prompt();
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment