Intro to Data Types
-
Primitive types
undefined
null
- String
- Boolean
- Number
-
null
- Data type
- Value of nothing
-
undefined
- Data type
- Absence of value, meaning nothing is assigned to a variable.
-
NaN
- Number type
- Not a number
- 'Hello' % 10 =>
NaN
- Type coercion converts
Hello
to number,NaN
- Type coercion converts
-
Implicit type coercion
"3"
can be converted by3
implicitly
-
Strict equality
===
and!==
- Check both type and value without type conversion