What are the falsy values in JavaScript?

const falsyValues = ['', 0, null, undefined, NaN, false];

Falsy values are values that when converted to boolean becomes false.

How to check if a value is falsy?

Use the Boolean function or the Double NOT operator !!


Author of content
Edit this page

Made by Michael Sakhniuk

Twitter