5 + “34”
534
5 - “4”
1 *This occurs because js can add strings together for eg.) “hello” + “world” would be “helloworld” but you can’t subtract a string from a string. “hello” - “bye” would result in a NaN.
So js converts the stringed number into a number whereas when you’re adding a number to a stringed number, js would convert the number into a string.
10 % 5
0
5 % 10
5
” “ + “ “
” “
” “ + 0
” 0”
3 - 4
-1
“bob” - “bill”
NaN
5 >= 1
true
0 === 1
false
4 <= 1
false
1 != 1
false
“A” > “B”
false
“B” < “C”
true
“a” > “A”
true
“b” < “A”
false
true === false
false
true != true
false
// Evaluate this question. What is a + b? var a = 34; var b = 21; a = 2; a + b // what is the answer here?
// What is c equal to? var c; undefined
a + b = 23
c = undefined