Someone help... i need help with this pls

Tell us what’s happening:
Describe your issue in detail here.
please what am i doing wrong

  **Your code so far**

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

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

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36

Challenge: Global vs. Local Scope in Functions

Link to the challenge:

The instructions say:

Add a local variable to myOutfit function to override the value of outerWear with the string sweater .

You have instead overridden “myOutfit”. You need to override “outerWear”.

You need to create a variable with that same name inside the function. The function will use that instance of the variable because it is in the function scope and will prefer that one over the one in the global scope.

1 Like

wow…Tnx soo much i just corrected it and it worked

1 Like

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