Question:What will be the output for the following code:var x = 1; if (true) { var x = 2; document.write(x); } document.write(x);
var x = 1; if (true) { var x = 2; document.write(x); } document.write(x);
A 11 B 12 C 22 D 21
+ AnswerC
+ Report