Well done!

You have completed JavaScript Scopes Quiz!

Quiz Question 1 of 5

Consider the following JavaScript code:

"use strict";
var x = 100;
function testScope() {
   if (true) {
       var x = 200;
       let y = 300;
   }
   return x + y;
}
alert(testScope());

What will be the result when the alert function is executed?

Choose the correct answer below:

Skip Quiz Review Instruction