complexity: 2 ; importance: 8; author: docentmail


Javascript Variable Scope.

Problem 2016-01-17-01-28

Question: What would be result of execution of the snippet?

for (var i=0; i<10; i++) { 
      var theVar="value1";
}

alert(theVar);