Data Types Flashcards

1
Q

What are the 7 primitive Data Types

A
  • Number
  • String
  • Boolean
  • Undefined
  • Null
  • Symbol(ES2015)
  • BigInt(ES2020)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain the typeOf bug

A

The typeOf bug is when the typeOf null returns ‘object’.

typeOf null = object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why are variable value datatypes not defined in JavaScript?

A

This is because JavaScript is dynamically typed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the BigInt datatype for?

A

Larger integers that the Number type can’t hold.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly