Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
nodejs-60-2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
winai buttasart
nodejs-60-2
Commits
e0ddf37b
Commit
e0ddf37b
authored
Jan 24, 2018
by
winai buttasart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update homework week2
parent
4a06b423
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
index.js
student/index.js
+30
-0
package.json
student/package.json
+22
-0
No files found.
student/index.js
0 → 100644
View file @
e0ddf37b
const
readline
=
require
(
'readline'
);
// const fs = require('fs');
// const io = readline.createInterface({
// input: fs.createReadStream('package.json'),
// crlfDelay: Infinity
// });
// io.on('line', (line) => {
// console.log('data in line : ' + line);
// });
// io.close('close', () => {
// console.log('จบการรับค่า');
// });
const
io
=
readline
.
createInterface
({
input
:
process
.
stdin
,
output
:
process
.
stdout
});
io
.
question
(
'> '
,
(
answer
)
=>
{
console
.
log
(
`สวัสดีคุณ
${
answer
}
`
);
io
.
close
();
});
// console.info("hello word");
// console.log(`name = ${name}`);
\ No newline at end of file
student/package.json
0 → 100644
View file @
e0ddf37b
{
"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"
,
"start"
:
"node index.js"
},
"repository"
:
{
"type"
:
"git"
,
"url"
:
"http://cs.sci.ubu.ac.th/b/Zt7yXa96XFPGXhvrg/node-js-60-2"
},
"keywords"
:
[
"student"
,
"comsci"
,
"ubu"
,
"nodejs"
],
"author"
:
"Nize"
,
"license"
:
"ISC"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment