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>10)
{
document.write(10);
}
else
{
document.write(a);
}

What will be the output of the following JavaScript code?
Int a=1;
if(a>10)
{
document.write(10);
}
else
{
document.write(a);
}
a) 10
b) 0
c) 1
d) Undefined

Answer: c
Explanation: The if else statement is a part of the javascript conditioning statements. The line of code inside the “if” statement is executed if the value passed to “if” is 1.

Join The Discussion