I dont know why but when ever i do, codecademy is always giving me a hassle with push methods. take this for example:
class Media{
constuctor(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 ratingSum = this.ratings.reduce((accumulator,rating)=>
accumulator + rating)
return ratingSum / this.ratings.length
}
addRating(value){
this._ratings.push(value)
}
}
when i try to call addRating with a value, the compiler will always return an error. Can someone help me figure this out?