Need help with the code

Need help with the code
0

#1

Tell us what’s happening:
This code isn’s passing the one test case. The test case being Global myVar is missing

Your code so far


function myLocalScope() {
  'use strict'; // you shouldn't need to edit this line
  var myVar="hi";
  console.log(myVar);
}
myLocalScope();

// Run and check the console
// myVar is not defined outside of myLocalScope
console.log(myVar);
var myVar="hello";
// Now remove the console log line to pass the test

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions/


#2

just follow the instructions.
It says to remove the line above so you can pass the test.


#3

Hey, Thank you. I was able to figure out the mistake.