js falsy name for object code example
Example 1: javascript falsy
// Falsy values:
0
''
undefined
null
NaN
Example 2: javascript falsy values
if (true)
if ({})
if ([])
if (42)
if ("0")
if ("false")
if (new Date())
if (-42)
if (12n)
if (3.14)
if (-3.14)
if (Infinity)
if (-Infinity)