===
Both
{}
and[]
are objects, and any object will be coerced to a boolean value oftrue
in JavaScript.Prefer to use
===
and!==
to avoid any unintended side-effects of type coercion.
NaN
NaN
Last updated
Was this helpful?
Both {}
and []
are objects, and any object will be coerced to a boolean value of true
in JavaScript.
Prefer to use ===
and !==
to avoid any unintended side-effects of type coercion.
NaN
Last updated
Was this helpful?