I'm trying to use prototypal inheritance and its not working, everytime i try i keep getting undefined:
function HospitalEmployee(name) {
this._name = name;
this._remaningVacationDays = 20;
}
function Nurse() {}
Nurse.prototype = Object.create(HospitalEmployee.prototype)
const nurseOlynyk = new Nurse("Olynyk", ["Trauma", "Genetics"])
console.log(nurseOlynyk._remainingVacationDays) //Prints undefined
What am i doing wrong?