Guys I believe I got some silly mistake in my code. It all works fine but on “toggleCheckOutStatus()” I get “undefined”
U can see my code on GitHub
Thank u!
Guys I believe I got some silly mistake in my code. It all works fine but on “toggleCheckOutStatus()” I get “undefined”
U can see my code on GitHub
Thank u!
Looking at your constructor method:
constructor(title) {
this._title = title;
this._isCheckedOut = false;
this._ratings = [];
}
Looking at your getter:
get isCheckedOut() {
return this._checkedOut; // Hmmm.... does this exist?
I knew its gonna be something silly. I do such mistakes often. Maybe I should always copy and paste those names. thank u very much for your help!
We all make these types of mistakes. The thing to learn is where to start looking when something other than what we expected happens. Happy coding!