Falsy Values and how to Handle them with Logical OR and Nullish Coalescing
Let's crack the egg!!
First, let's understand the OG - Logical OR (| |)
Logical OR operator (||) is used to set a default value for a variable in case it is "falsy" (i.e., evaluates to false, null, undefined, 0, NaN, or an empty string).
If the firs...
shushma.hashnode.dev1 min read
Anand Baraik
Novice in everything, student for life!
Short & crisp π well written!