0 votes
in JavaScript by
Choose the correct snippet from the following to check if the variable "a" is not equal the "NULL":

a) if(a!==null)

b) if (a!)

c) if(a!null)

d) if(a!=null)

1 Answer

0 votes
by

Answer: A

Reason: The "==" is only true if the type and the content of both operands are the same. The "==" is also one of the common abstracts used for comparing two operands to check whether they are equal or not but it will notcheck the data type of the variables. So, the "! ==" operator is known as "non-equal", which is used in our case, to compare 0 to NULL. It obtains the output either as true or false that totally depends on the given conditions.

Related questions

0 votes
asked Mar 21, 2021 in JavaScript by rajeshsharma
0 votes
asked Mar 20, 2021 in JavaScript by sharadyadav1986
...