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 !!


Made in India with ❤️ by Rajesh Kumar Yadav

Twitter