Use a setter to add multiple things to an array

I am doing the build a library project -

I have this class

class Movie extends Media{
constructor (director, title, runTime){
super (title);
this._director = director;
this._runTime = runTime;

I want to make a setter that lets me add multiple items to the moviecast array. at once. Is this possible?

addCast (value) {

speed.addCast (‘Tom’, ‘Rick’, ‘Harry’)

This just adds one item to the array at a time.

I am wondering if it’s possible to add the cast when I add a new Movie.


You could present an array instead of single values separated by comma’s.

addCast (value) {
   this._movieCast = value;

speed.addCast(['Tom', 'Rick', 'Harry'])