Commit 079dd1b1 authored by Patiphan Marak's avatar Patiphan Marak

Add new file

parent 4f2ac563
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