Tell us what’s happening:
I have gotten this far on this particular class. I am having the problem of creating a local variable. May someone give me some information about this.
Your code so far
function myLocalScope() {
var myvar = "Johnny";
'use strict'; // you shouldn't need to edit this line
}
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_14_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.1 Safari/605.1.15.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions/