Global vs. Local Scope in Functions issue


// Setup
var outerWear = "T-Shirt";

function myOutfit() {
// Only change code below this line
function myOutfit() {
var outerWear = "sweater";
return outerWear;
}
// Only change code above this line
return outerWear;
}

myOutfit();

can u tell me whats the problem with it?

Hi!
I know it says to only change the code within the two comments, but perhaps take a look just outside those comments. It seems that you have repeated some code?

:smiley:
ok
thank u.
@AndreasGuldborg

1 Like

I hope it helped!
Feel free to post and ask again if you stumble upon more issues or if you are still experiencing issues with this challenge! :slight_smile:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.