QUESTION IMAGE
Question
jump to level 1
define a setter function named wonaward () that takes a parameter for the name of an award and pushes the award name onto the end of the awards array.
1 // code will be tested with a different movie
2 let movie = {
3 title: \forrest gump\,
4 director:
obert zemeckis\,
5 composer: \alan silvestri\,
6 budget: 55000000,
7 boxoffice: 677900000,
8 awards: ,
9
10 / your solution goes here /
11
12 };
Step1: Define the setter function
movie.wonAward = function(awardName) {
Step2: Push the award name to the awards array
this.awards.push(awardName);
};Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
movie.wonAward = function(awardName) {
this.awards.push(awardName);
};