Q. Which of the following is the correct output for the following JavaScript code:

Code:
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);  
  • (A) 3
  • (B) 0
  • (C) Error
  • (D) 2
πŸ’¬ Discuss
βœ… Correct Answer: (B) 0

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
349
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Durgesh
Publisher
πŸ“ˆ
83%
Success Rate