Tell us what’s happening:
This problem resolution took me a while to figure out, but is seemingly easy therefore it must be.
Your code so far
function myLocalScope() {
'use strict'; // you shouldn't need to edit this line
var myVar = "Hello World";
console.log(myVar);
}
myLocalScope();
// Run and check the console
// myVar is not defined outside of myLocalScope
// Now remove the console log line to pass the test
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions/