debugging from an image is really difficult, please copy paste your code to the forum
same page or same file? The answer to this question is not so straightforward as it might seem. This depends if you are doing front-end or back-end web development. In case of front-end, you can write them in separate files, but then you would have to use something like webpack to produce a single output file. You will very likely need webpack for es6 anyway, given browser support isn’t good enough yet
next/after each other, you can’t inherit from something which isn’t fully defined yet.
you can also nest (inside) classes. But you can’t inherit from something which you are in the midst of defining.
class HospitalEmployee {
constructor(name) {
this.name=name;}
get name (){return this._name;}
get remaningVacationDays (){return this._remainningVacationDays;}
takeVacationDays(){this._takeVacationDays;} }
class Doctor {
constructor(name, remainingVacationDays, insurance){
this._name=name;
this._remainingVacationdays=20;
this._insurance=insurance;}
get name (){return this._name;}
get remaningVacationDays (){return this._remainningVacationDays;}
takeVacationDays(){this._takeVacationDays;} }
class Nurse {
constructor (name,remainingVacationDays, certifications ) {
this._name=name;
this._remainingVacationdays=20;
this._certifications=certifications;}
get name (){return this._name;}
get remaningVacationDays (){return this._remainningVacationDays;}
takeVacationDays(){this._takeVacationDays;}
addCertification() }
your addCertification is half-cooked, its not a complete function. Either complete it or remove it for the time being if you don’t know what do with it yet