What are falsy values in Javascript?
JavaScript offers a special list of seven values known as falsy values. These values have the unique trait of always evaluating false in a condition statement.
The following list explains how to identify falsy values:
- the number
0 - the
BigInt 0n - the keyword
null - the keyword
undefined - the boolean
false - the number
NaN - the empty string
""(equivalent to''or ``)
There are a few properties of falsy values to keep in mind:
-
0==0n==false=="": The values0,0n,false, and""are closely equal to each other. This means that if you write0==falsein a condition, the condition will returntrue. -
null==undefined: Thenullandundefinedvalues are closely equal to each other. This means that if you writenull==undefinedin a condition, the condition will returntrue. -
NaNdoes not equal anything, not even itself.
Free Resources
Copyright ©2026 Educative, Inc. All rights reserved