Data Types Flashcards
1
Q
What are the 7 primitive Data Types
A
- Number
- String
- Boolean
- Undefined
- Null
- Symbol(ES2015)
- BigInt(ES2020)
2
Q
What is the typeOf operator in JavaScript?
A
The type of operator is a special operator used to show the type of a value.
3
Q
Explain the typeOf bug
A
The typeOf bug is when the typeOf null returns ‘object’.
typeOf null = object
4
Q
Why are variable value datatypes not defined in JavaScript?
A
This is because JavaScript is dynamically typed.
5
Q
What is the BigInt datatype for?
A
Larger integers that the Number type can’t hold.