Yes. Empty arrays are truthy in JavaScript.
JavaScript has a small set of falsy values including false, 0, '', null, undefined, and NaN.
Yes. Empty objects are truthy.
No. Any non-empty string is truthy.
Browse all our FAQs or reach out to our support team
Your learning library
Find your next course. Build something great.
LEARN. BUILD. GROW.