Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following JavaScript code?
int a=1;
if(a!=null)
return 1;
else
return 0;

What will be the output of the following JavaScript code?
int a=1;
if(a!=null)
return 1;
else
return 0;
a) runtime error
b) compiler error
c) 1
d) 0

Answer: c
Explanation: != is the not equal to operator. It gives a value of 1 if the two values which are compared are not equal and give 0 if the two values are equal.

Join The Discussion