How to pass the text

Tell us what’s happening:
how to pass the text. Which part i missing?

Your code so far


function myLocalScope() {
var myVar= 5;

// Only change code below this line

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/86.0.4240.111 Safari/537.36.

Challenge: Local Scope and Functions

Link to the challenge:

It’s a small thing, but the comment says:

// Only change code below this line

And you added it above that line.

An important skill for web development is paying attention to minute details.

2 Likes

There is nothing wrong with the code. Try to define and initialize myVar variable just below the comment.