Tell us what’s happening:
Hi! I think the challenges instructions are contradictory ones:
“Instructions: Add a local variable to myOutfit to override the value of outerWear with “sweater”.”
but
in the error console tell me this: “Do not change the value of the global outerWear”
so, I don’t realise how can I override the value of outeWear and don’t change its value at the same time. =(
Your code so far
var outerWear = "T-Shirt";
function myOutfit() {
// Only change code below this line
var myOutfit = "sweater";
outerWear = myOutfit;
// Only change code above this line
return outerWear;
}
myOutfit();
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
.
Link to the challenge:
https://www.freecodecamp.org/challenges/global-vs-local-scope-in-functions