Tell us what’s happening:
I have to [ Declare a local variable myVar
inside myLocalScope
and run the tests.] However after searching for hints and rewatching the video I still cannot solve this issue
Your code so far
function myLocalScope() {
// Only change code below this line
console.log('inside myLocalScope', myVar);
}
myLocalScope('myVar');
console.log(myVar);
// Run and check the console
// myVar is not defined outside of myLocalScope
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36 Edg/89.0.774.77
.
Challenge: Local Scope and Functions
Link to the challenge: