อ่านปีพศเกิดได้แล้ว

parent 83ec743e
...@@ -2,6 +2,7 @@ const readline = require('readline'); ...@@ -2,6 +2,7 @@ const readline = require('readline');
const rl = readline.createInterface({input: process.stdin, output: process.stdout}); const rl = readline.createInterface({input: process.stdin, output: process.stdout});
console.log('Hello world'); // print('Hello world'); rl.question('กรอกปีเกิด ', (year) => {
console.log(`ตอนนี้คุณอายุ ${2563-year} ปี`);
rl.close(); rl.close();
\ No newline at end of file })
\ No newline at end of file
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