Local Scope and Functions HELP! PLEASE!

Local Scope and Functions HELP! PLEASE!
0.0 0

#1

Tell us what’s happening:
I ad a variable myVar and assign it the use strict string and it doesn’t work. Then I place myVar elsewhere and I just can’t seem to get this to work no matter what. I’m passing the create local variable portion, but the second portion is unfulfilled.

Your code so far

function myLocalScope() {
  var = myVar = 'use strict';
  
  
  console.log(myVar);
}
myLocalScope();
var myVar = 10;
// Run and check the console
// myVar is not defined outside of myLocalScope
console.log(myVar);

// Now remove the console log line to pass the test

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1 Safari/605.1.15.

Link to the challenge:


#2

Your syntax is wrong, you have an extra assignment operator on var = myVar = 'use strict'; line. Declare the variable with: var myVar = 'use strict';


#3

OMG!!! A SPACE THIS WHOLE TIME!

Thank you for your help.


#4

You write syntax of var decleration wrong.

You have to write var myVar = “use strict”;

You wrote var = myVar = “use strict”;

`