Tell us what’s happening:
I ad a variable myVar and assign it the use strict string and it doesn’t work. Then I place myVar elsewhere and I just can’t seem to get this to work no matter what. I’m passing the create local variable portion, but the second portion is unfulfilled.
Your code so far
function myLocalScope() {
var = myVar = 'use strict';
console.log(myVar);
}
myLocalScope();
var myVar = 10;
// Run and check the console
// myVar is not defined outside of myLocalScope
console.log(myVar);
// Now remove the console log line to pass the test
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1 Safari/605.1.15.
Link to the challenge:
https://www.freecodecamp.org/challenges/local-scope-and-functions