Some Tricky questions in JavaScript that are Easy to answer 😵

Truthy & Falsy Values :

Truth & False are the most common rivals in the whole world, ain’t they? And we see more false than truth in real world. In JavaScript , this case is the same. The number of falsy values is larger than truthy values.

Null vs Undefined :

Double Equal(==) vs Triple Equal(===) :

Both are equal checking operators but a little bit different. Let’s see some examples with them. if(a == b) this checks whether the two values are same or not (both a & b might not be the same type)

Scope :

I am gonna jump into examples directly for this.

Closure :

When a function returns another function which returns a value accessed from it’s outer-scope, there is created a closed environment , this is called closure. Let’s see an example :

Junior Front-End Developer trying to learn & broaden the knowledge