Oops! The test returned an error. takeVacationDays(daysOff) {remainingVacationDays = this._remainingVacationDays-daysoff}; ^ ReferenceError: daysoff is not defined


#1

Here’s my code:

‘’’
class Surgeon {
constructor(name, department) {
this._name = name;
this._department = department;
this._remainingVacationDays = 20;
}
get name() {
return this._name;
}
get department() {
return this._department;
}
get remainingVacationDays() {
return this._remainingVacationDays;
}
takeVacationDays(daysOff) {remainingVacationDays = this._remainingVacationDays-daysoff};

}

const surgeonCurry = new Surgeon(‘Curry’, ‘Cardiovascular’);
const surgeonDurant = new Surgeon(‘Durant’, ‘Orthopedics’);
‘’’


#2

Can you spot the error? (Remember, JS is case sensitive.)


#3

Yeah. I spotted that but got another error. I don’t know if you can help. I don’t have the error message anymore. I went to the solution.


#4

Okay, now compare the line above to the solution. Can you spot the issue?