21 Flashcards
(5 cards)
1
Q
Falsy Values
A
values that resolve to the Boolean false
2
Q
Truthy Values
A
values that resolve to the Boolean true
3
Q
Which Falsy Values exist?
A
0
‘’ (empty String)
undefined
null
NaN
4
Q
Boolean(‘Jonas’)
A
true
(any string that is not empty is a truthy value)
5
Q
if(height)
A
tests if the variable height is defined (has a value)
Example:
let height;
if(height) → false (undefined)