Local Scope and Functions not understanding the instructions

Local Scope and Functions not understanding the instructions
0

#1

Tell us what’s happening:
Well… I really don’t know what’s wrong.
I declared a variable outside the local scope… as a GLOBAL, if I’m not wrong.
And then I specified a variable in the local scope.

I still get the message:
“You ddn’t declare a global variable”

Your code so far


function myLocalScope() {
  'use strict';
  var myVare = 54;
  
    console.log(myVar);

}

 
// Run and check the console
// myVar is not defined outside of myLocalScope


Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36.

Link to the challenge:


#2

A couple of things , 1) use ‘use strict’ at the beginning of your code before anything else and 2) you have a spelling error in myVar


#3

Dear Dereje1.
Thank you for the super fast answer and a nice Sunday to you.
Sory but either I don’t get what you mean or it is a mistake.
If it helps: the proble I refer to is called “Local Scope and Functions”. In the JAVA course.

Best regards