JS Truthy and Falsey

In the name of Allah the most merciful and the most gracious.

In this article I intended to transfer my Truthy and Falsey values to you. I hope you enjoy reading 📚 this article.

In Javascript we have six Falsey values which are:

  • Undefined
  • NaN
  • Null
  • ‘ ‘ means empty string
  • False
  • 0

If you try these falsey values in your code editor then you’ll suss it out that these are falsey values.

We can change falsey values into truthy and vice-versa by using ! Operator.

For example:

!true -> false

‘!’ Means not in Javascript.keep this in mind.

And others are truthy values like:string,number…