1.Which are Truthy and Falsy values?

Truthy values are which are true in boolean context and falsy values are false in boolean context.When we write if/else in a programming language we pass a value in if () condition which is a strictly boolean means either true or false.In javascript, if/else statement checks if a value is truthy or falsy.

Falsy values : 0 , “” , null , undefined NaN .

Truthy values : ‘0’ , “ “ , [] , {} .

2. What’s the difference between Null and Undefined

Undefined

Undefined means a variable is declared but the…

Mainul Fahim

A Full stack developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store