function myLocalScope() {
var myVar = 5;
// Only change code below this line
console.log('inside myLocalScope', myVar);
}
myLocalScope();
// Run and check the console
// myVar is not defined outside of myLocalScope
console.log('outside myLocalScope', myVar);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36.
var myVar = 5;
// Only change code below this line
The comment tells you where it is supposed to be. I understand that functionally it is the same, but part of being a developer is noticing and following tiny details.