JavaScript Flashcards

(3 cards)

1
Q

What is the null value in JS?

A

null is an EXPLICIT assignment by a developer to indicate ‘no value’ or ‘empty. It is done on purpose e.g. let x = null.

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

What is undefined in javascript?

A

Undefined is a variable that has been declared but not assigned a value, or an object property that doesn’t exist.

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

What is NaN?

A

It is the result of an invalid or undefined mathematical operation.

eg parseInt(“hi”) // NaN

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