JS Classes Error

Hi folks,

So I am trying to do this task JS Classes, but I seem to be hitting a brick wall with a Syntax error on my super key word. I have used the walkthrough video, checked the code a thousand times and now all I see is letters and numbers :stuck_out_tongue: If anyone can spot something on this I would appreciate it.

Thanks in advance :slight_smile:

  constructor(title) {
    this._title = title;
    this._isCheckedOut = false;
    this._ratings = [];
  }
  get title() {
    return this._title;
  }
  get isCheckedOut() {
    return this._isCheckedOut;
  }
  get ratings() {
    return this._ratings;
  }
  set isCheckedOut(value) {
    return this._isCheckedOut = value;
  }
  toggleCheckOutStatus() {
    this.isCheckedOut = !this.isCheckedOut;
  }
  getAverageRating() {
    let ratingsSum = this.ratings.reduce((accumulator, rating) => accumulator + rating);
    return ratingsSums / this.ratings.length;
  }
  addRating(value) {
    this.ratings.push(value);
  }
};
class Book extends Media {
  contructor(author, title, pages) {
    super(title);
    this._author = author;
    this._pages = pages;
  }
  get author() {
    return this._author;
  }
  get pages() {
    return this._pages;
  }
};
class Movie extends Media {
  contructor(director, title, runTime) {
    super(title);
    this._director = director;
    this._runTime = runTime;
  }
  get director() {
    return this._director;
  }
  get runTime() {
    return this._runTime;
  }
};

Hey @zach-savva
it’s just a typo :slightly_smiling_face:

Really? I did put `class Media { in too, I just mised that off the top of the topic.

Here it is…
That happened twice.

1 Like

Ahhh, I have been pulling my hair out about that :stuck_out_tongue:

Thanks

1 Like