Tell us what’s happening:
Following the instruction properly but still don’t know what is the error in this code.
Your code so far
// Setup
var outerWear = "T-Shirt";
function myOutfit() {
// Only change code below this line
var myVar = "sweater";
outerWear = myVar;
// Only change code above this line
return outerWear;
}
myOutfit();
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
.
Challenge: Global vs. Local Scope in Functions
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/global-vs.-local-scope-in-functions