- script.js
JavaScript
var food = 'pies';
var eatDinner = function () {
console.log('I ate ' + food);
};
Result
Goalscompleted
- After the
eatDinnerfunction is defined, call this function. - Change the value of the variable
foodto'vinaigrette salad'later in the code after the function call. - After that once again call the
eatDinnerfunction.
Comments