-
The snippet that has to be used to check if “a” is not equal to “null” is _________
-
- if(a!==null)
- if(a!null)
- if (!a)
- if(a!=null)
- None of these
Correct Option: A
A strict comparison (e.g., ===) is only true if the operands are of the same type and the contents match. The more commonly-used abstract comparison (e.g. ==) converts the operands to the same type before making the comparison. The not-equal operator !== compares 0 to null and evaluates to either true or false.