freeCodeCamp
freeCodeCamp copied to clipboard
Unable to complete Waypoint
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 You need to remove the console log line outside of myFunction(), as it says in the commented parts of the code.
Closing as not an issue. Thanks and happy coding!