Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hello. The image below is the Question with the code that I entered which I highlighted. That highlighted code is wrong and is giving me
Hello. The image below is the Question with the code that I entered which I highlighted. That highlighted code is wrong and is giving me an error which you can see in the second image. Please help correct the highlighted code to show the "Expected" output in the second image. Thank you.
Image of Error from above code:
Define a setter function named wonAward that takes a parameter for the name of an award and stores the award name in the awards array 9 1 let movie = { // Code will be tested with a different movie 2 name: "Forrest Gump", 3 director: "Robert Zemeckis", 4. composer: "Alan Silvestri", 5 cast: { 6 "Tom Hanks": "Forrest Gump", 7 "Michael Connor Humphreys": "Young Forrest Gump", 8 "Robin Wright": "Jenny Curran", "Gary Sinise": "Lieutenant Dan Taylor" 10 }, budget: 55000000, 12 boxoffice: 677900000, awards: [], 14 15 1* Your solution goes here */ 16 WonAward (award) { 17 this.awards.push(award); 18 19 }; 11 13 X Testing with wonAward = "Best Picture" Yours and expected differ. See highlights below. Special character legend Yours Expected Best Picture X Testing with wonAward = "Best Director", and wonAward = "Best Visual Effects" Yours and expected differ. See highlights below. Special character legend Yours Expected Best Director, Best Visual EffectsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started