freeCodeCamp: Local Scope and Functions - doesn't work
Challenge Local Scope and Functions has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
function myFunction() {
'use strict';
var myVar = "test";
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
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 26 (4 by maintainers)

function myLocalScope() { ‘use strict’; var myVar = “teste”;
console.log(); } myLocalScope();
// Run and check the console // myVar is not defined outside of myLocalScope console.log();
// Now remove the console log line to pass the test
can confirm this is a bug. need to refresh in order to pass.
I had the same issue
Also required a refresh for this to work, did not work initially.