Build a Library - get undefined

Hello, I’m stuck on the project Build a Library

class Media {
constructor(title) {
this._title = title;
this._isCheckedOut = false;
this._ratings = ;
}

get title(){
return this._title;
}

get ratings() {
return this._ratings;
}

get isCheckedOut() {
return this._checkedOut;
}

set isCheckedOut (value) {
this._isCheckedOut = value;
}

toggleCheckOutStatus() {
this.isCheckedOut = !this.isCheckedOut;
}

getAvarageRating () {
let ratingSum = this._ratings.reduce((currentSum, rating) => currentSum + rating, 0);
return ratingSum / this._ratings.length;
}

addRating (arg) {
this._ratings.push(arg)
}
};

class Book extends Media {
constructor(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 {
constructor (director, title, runTime) {
super(title);
this._director = director;
this._runTime = runTime;
}

get director() {
return this._director;
}

get runTime() {
return this._runTime;
}
}

const historyOfEverything = new Book (‘Bill Bryson’, ‘A Short History of Nearly Everything’, 544);

historyOfEverything.toggleCheckOutStatus();

console.log(historyOfEverything.isCheckedOut);

historyOfEverything.addRating(4);
historyOfEverything.addRating(5);
historyOfEverything.addRating(5);
console.log(historyOfEverything.getAvarageRating())
https://www.codecademy.com/courses/introduction-to-javascript/projects/build-a-library

I don’t know why I get undefined when I try to print .isCheckedOut

I was trying to figure out almost 2 hours and still I don’t know why.
Can someone please help me.

presumably you didn’t define it?

Hi, I don’t have an answer but also having the same issue :frowning: !

so it’s not just you. I am not sure what is happening with the code but am unsure why the person put the value as “value” ? … but I do not know nearly enough about this to have a clue what to do so this is why I am here as well! … I wish there was some one you could directly ask for help when this happens.

this._isCheckedOut = false;
set isCheckedOut (value) {
this._isCheckedOut = value;
}

value is the result of isChechedOut if is true or false.

Wow…after a good sleep I came back to exercise.
The problem was the Typo for get.

get isCheckedOut() {
return this._checkedOut;
}

return this.checkedOut instead of return this.isCheckedOut;

ava8788130228 as well the get method and set to see if you have any Typo