- script.js
JavaScript
var collectContainer = function () {
var food = 'pasta';
var eatDinner = function () {
console.log('I ate ' + food);
};
return eatDinner;
};
Result
Goalscompleted
- After the
collectContainer
function is redefined, create a variableschoolkid
. - Indicate that the
schoolkid
variable is equal to thecollectContainer
function call. - After that, output the
schoolkid
variable to the console. - After that call the resulting function:
schoolkid()
.
Comments