freeCodeCamp icon indicating copy to clipboard operation
freeCodeCamp copied to clipboard

Unable to complete Waypoint

Open edwintcloud opened this issue 10 years ago • 2 comments

Challenge Waypoint: Local Scope and Functions has an issue. User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

function myFunction() {
  var myVar = 'use strict';


  console.log(myVar);
}
myFunction();

// run and check the console 
// myVar is not defined outside of myFunction
console.log(myVar);

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


edwintcloud avatar Jan 12 '16 17:01 edwintcloud

@edwintcloud You need to remove the console log line outside of myFunction(), as it says in the commented parts of the code.

alistermada avatar Jan 13 '16 03:01 alistermada

Closing as not an issue. Thanks and happy coding!

arialaurel avatar Jan 13 '16 04:01 arialaurel