local
variable takes precedence over the global
variable.
In this example:
```js
var someVar = "Hat";
function myFun() {
var someVar = "Head";
return someVar;
}
```
The function myFun
will return "Head"
because the local
version of the variable is present.
myOutfit
function to override the value of outerWear
with "sweater"
.
outerWear
testString: assert(outerWear === "T-Shirt");
- text: myOutfit
should return "sweater"
testString: assert(myOutfit() === "sweater");
- text: Do not change the return statement
testString: assert(/return outerWear/.test(code));
```