var x=3;
var y=2;
var z=0;
If(x==y)
document.write(x);
elseif(x==y)
document.write(x);
else
document.write(z);
- 3
- 0
- Error
- 2
var x=3;
var y=2;
var z=0;
If(x==y)
document.write(x);
elseif(x==y)
document.write(x);
else
document.write(z);
The answer is 0 here.
Explanation:
Both the conditions of if (x==y) are false.
As a result, the other part will be printed. So the answer is that the value of Z is 0.