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.
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.
3
Q
What is NaN?
A
It is the result of an invalid or undefined mathematical operation.
eg parseInt(“hi”) // NaN