Commit 0dbf6c76 authored by tanapoom's avatar tanapoom

งานweek2

parent afd0e173
nodejs-60-2 @ afd0e173
Subproject commit afd0e1731b0de2f10068fa903e5f464b6adf1a19
const message = "Hello World";
let name = "";
console.info(message);
const readline = require('readline');
const fs = require('fs');
const rl = readline.createInterface({
input: fs.createReadStream('package.json'),
crlfDelay: Infinity
});
rl.on('line', (line) => {
console.log('ผู้ใชช้กรอกข้อมูลแล้ว :' + line);
});
rl.on('close', () => {
console.log('ไม่มีบรรทัดให้อ่านแล้ว');
});
const rm = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rm.on('line', (answer) => {
console.log(`สวัสดี` + answer);
rm.close();
});
{
"name": "stusent",
"version": "0.1.0",
"lockfileVersion": 1
}
{
"name": "stusent",
"version": "0.1.0",
"description": "display studen information given nickname for partially enterred fullname",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "http://projectcs.sci.ubu.ac.th/tanapoom/nodejs-60-2"
},
"keywords": [
"students",
"nodejs",
"comsciubu"
],
"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