Basic JavaScript: Local Scope and Functions!

Im Stuck In This Challenge

My Code So Far


function myLocalScope() {
var myVar = 5;
console.log(myVar);
}
myLocalScope();


My browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 13099.85.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.110 Safari/537.36.

Challenge: Local Scope and Functions

Link to the challenge:

Hi!

Your console.log hat to be exactly as expected----->

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

In your console.log is the first part ‘inside myLocalScope’ missing!

I Still Dont Understand.


function myLocalScope() {
var myVar = 5;
console.log(myVar);
}
myLocalScope();
console.log('inside myLocalScope', myVar);

Don’t assign the variable to anything.

Hi Ayub,

I meant the question was that you have ONLY to declare a variable as expected without changing anything in the code provided by FCC and it will be submitted without any problems.
Is your code now working!
‘inside myLocalScope’ is not important for the execution of the code!
Tell me if your code runs! Thanks!
Reset your code and add simply the variable myVar! As @GhostRooXt said is assignment not important for the solution!