*** USING JAVASCRIPT ** Create a an Object constructor function called MedRecord
ID: 3826037 • Letter: #
Question
*** USING JAVASCRIPT **
Create a an Object constructor function called MedRecord with the properties firstName, lastName, medRecord, medID, insuranceInfo.
Define a MedRecord prototype method called changeInsurance() that accepts the name of a patient new insurance information and update object insuranceInfo property.
Create a an Object constructor function called MedRecord with the properties firstName, lastName, medRecord, medID, insuranceInfo.
Define a MedRecord prototype method called changeInsurance() that accepts the name of a patient new insurance information and update object insuranceInfo property.
Explanation / Answer
function MedRecord(fname,lname,mrecord,mid,iinfo){
this.firstName = fname;
this.lastName = lname;
this.medRecord = mrecord;
this.medID = mid;
this.insuranceInfo = iinfo;
}
MedRecord.prototype.changeInsurance = function(info) {
this.insuranceInfo = info;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.