Hello Guys!
I have got stuck in this challenge. I would really appreciate it if someone could give me a bright light!
Thanks in advance!
C.B.
Your code so far
function myLocalScope() {
'use strict';
// Only change code below this line
console.log('inside myLocalScope', myVar);
}
function myLocalScope() {
var myVar = "foo";
console.log(myVar);
}
myLocalScope();
// 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/72.0.3626.121 Safari/537.36
.
Challenge: Local Scope and Functions
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functionsPreformatted text