Well done!

You have completed JavaScript Scopes Quiz!

Quiz Question 1 of 5

Analyze the following code and determine what will happen:

"use strict";
function outerFunction() {
   let outerVar = 10;
   function innerFunction() {
       var innerVar = 20;
       outerVar = outerVar + innerVar;
   }
   innerFunction();
   return outerVar;
}
alert(outerFunction());
alert(innerVar);

Choose the correct answer below:

Skip Quiz Review Instruction