|| is known as OR operator. It checks whether any one of the two operands is non-zero (0, false, undefined, null or “” is considered as zero).
Logical OR operator
What is the difference between == and === in JS?
spread / rest operator
What are the 3 logical operators?
Falsy equality using ==
What does != Mean in JS?
not equal to
What does || mean in coding?
logical OR operator
What does === mean?
1 x === y. The triple equals operator ( === ) returns true if both operands are of the same type and contain the same value. If comparing different types for equality, the result is false. This definition of equality is enough for most use cases.
isNaN() method determines whether a value is NaN (Not-A-Number). … The global isNaN() function converts the tested value to a Number, then tests it. Number. isNaN() does not convert the values to a Number, and will not return true for any value that is not of the type Number.