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

A 11 

B 12 

C 22 

D 21 

+ Answer
+ Report
Total Preview: 20

Copyright © 2024. Powered by Intellect Software Ltd