Commit 96d8310e authored by Natchaya Sripaksee's avatar Natchaya Sripaksee

ขอ2คะแนน

parent 919cd9d0
// const message = "hello world!";
//
// int name = "";
//
// console.info(message);
const readline = require('readline');
const fs = require('fs');
const rl = readline.createInterface(
{
input: process.stdin,
output: process.stdout,
prompt: ' กรอก > '
// input: fs.createReadStream('package.json'),
// crlfDelay: Infinity
}
);
rl.on('line', (line) => {
switch (line.trim()) {
case 'hello':
console.log('world!');
break;
default:
console.log(`สวัสดี '${line.trim()}'`);
break;
}
rl.prompt();
}).on('close', () => {
process.exit(0);
});
nodejs-60-2 @ 919cd9d0
Subproject commit 919cd9d0eef1241b4a5fc6e407edcf8519fbcd2d
{
"name": "student",
"version": "0.1.0",
"lockfileVersion": 1
}
{
"name": "student",
"version": "0.1.0",
"description": "display student information given nickname for partially entered fullname.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "http://projectcs.sci.ubu.ac.th/Sripakdee/nodejs-60-2"
},
"keywords": [
"students",
"nodejs",
"comsci",
"ubu"
],
"author": "csubu",
"license": "ISC"
}
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