Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

*** 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;
}