Question:What will be the output for the following code:
var x = 1;
   if (true) {
        var x = 2;
        document.write(x);
   }
    document.write(x);
 

A 11 

B 12 

C 22 

D 21 

+ Answer
+ Report
Total Preview: 16

Copyright © 2024. Powered by Intellect Software Ltd