Commit fe092cc8 authored by Patiphan Marak's avatar Patiphan Marak

Update index.js

parent 9abf48c6
...@@ -6,7 +6,7 @@ const r = readline.createInterface({ ...@@ -6,7 +6,7 @@ const r = readline.createInterface({
let i = 0; let i = 0;
let label =['กรุณากรอกชื่อ','กรุณากรอก พ.ศ.','กรุณากรอกเบอร์โทร'] let label =['Name ','Year ','Phone ']
let data = [] let data = []
console.log(`${label[i]}`) console.log(`${label[i]}`)
i++; i++;
...@@ -19,7 +19,7 @@ r.on('line', (line) => { ...@@ -19,7 +19,7 @@ r.on('line', (line) => {
else { else {
console.log(`สวัสดีคุณ ${data[0]} เบอร์ ${data[2]} อายุ ${2561-data[1]} `); console.log(`Hi ${data[0]} Phone ${data[2]} Age ${2561-data[1]} `);
r.close() r.close()
} }
}) })
......
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