Declare variable

Declare variable

Your code so far


function myLocalScope() {
'use strict';

var  myVar <--

console.log('inside myLocalScope', myVar);
}
myLocalScope();

// Run and check the console
// myVar is not defined outside of myLocalScope
console.log('outside myLocalScope', myVar);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0.

Challenge: Local Scope and Functions

Link to the challenge:

Do you have a question?