Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update homework day9 #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 42 additions & 41 deletions Homework-1.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
// 1. จงคำนวณค่าด้านล่างต่อไปนี้ และ คอมเม้นตอบหลังคำถาม
5 + "34" // ตอบตรงนี้
5 ** 4 // ตอบตรงนี้
5 - "4" // ตอบตรงนี้
10 % 5
5 % 10;
(2 ** 5) % 2
"Java" + "Script"
" " + " "
" " + 0
20 + 4 + "15"
true + true
true + false
false + true
false - true
false - true + false - true + false;
(true + true) ** 4
19 + true + "20"
3 - 4
"Bob" - "bill"
"Code" + "Camp" + true + false + null + undefined
5 + "34" // 534
5 ** 4 // 625
5 - "4" // 1
10 % 5 // 0
5 % 10; // 5
(2 ** 5) % 2 // 0
"Java" + "Script" //JavaScript
" " + " " // " "
" " + 0 // 0
20 + 4 + "15" // 2415
true + true // true
true + false // 1
false + true // 1
false - true // -1
false - true + false - true + false; // -2
(true + true) ** 4 //16
19 + true + "20" //2020
3 - 4 //-1
"Bob" - "bill" //NaN
"Code" + "Camp" + true + false + null + undefined //CodeCamptruefalsenullundefined


// 2. จงคำนวณค่าเปรียบเทียบต่อไปนี้ และ คอมเม้นตอบด้านหลังเหมือนข้างบน
5 >= 1
0 === 1
4 <= 1
1 != 1
1 == "1"
1 === "1"
"2" == "2"
"2" === "2"
"12" !== 12
"15" != 15
"A" > "B"
"B" < "C"
"a" > "A"
"b" < "A"
"bee" > "bbe"
"BeE" < "Bee"
"SonTer" > "Soncom"
"circle" > "circles"
"NaRuTo" < "nArUtO"
true === false
true != true
5 >= 1 //true
0 === 1 //false
4 <= 1 //false
1 != 1 //false
1 == "1" //true
1 === "1" //false
"2" == "2" //true
"2" === "2" //true
"12" !== 12 //true
"15" != 15 //false
"A" > "B" //false
"B" < "C" //true
"a" > "A" //true
"b" < "A" //false
"bee" > "bbe" //true
"BeE" < "Bee" //true
"SonTer" > "Soncom" //false
"circle" > "circles" //false
"NaRuTo" < "nArUtO" //true
true === false //false
true != true //false


// 3. สร้าง String ที่มีค่า "Hello, It's me. "Mario"."
console.log(`Hello, It's me. ${"Mario"}.`)