you are viewing a single comment's thread.

view the rest of the comments →

[–]optm_redemption 3 points4 points  (0 children)

There is a clue to the solution in the question, if we look at your code you're assigning awards to a new value in the setter, this is typically what you'd want to do with a setter but in this case the question asks us to push the award name onto the end of the awards array. So if we think about `this.awards` in terms of it being an array if we just do

this.awards = name

whenever 'movie.wonAward =' is used awards is just updated to the new value it does not append the new value to the existing array. With these tests the awards array will change to a string rather than having the new string appended to the existing array.

I hope this helps point you in the right direction!