// Define the method that we prototyped function verifyAttach(){ // Check to see if the type property we added is set to a valid value if(this.type){ return true; }else{ return false; } } // Create a new property and method of the SendMail object. SendMail.prototype.attachment = null; SendMail.prototype.hasAttach = verifyAttach; // Create a SendMail object var myMail = new SendMail(); // Using the prototype we defined, assign the type property myMail.type = false; // Check to see if there is an attachment if(myMail.hasAttach()){ write(myMail + " has a valid type of " + myMail.type); }else{ write(myMail + " has an invalid type of " + myMail.type); }