// Define the method that we prototyped function verifyProject(){ // Check to see if the type property we added is set to a valid value if(this.type == "project"){ return true; }else{ return false; } } // Create a new property and method of the Lock object. Lock.prototype.type = null; Lock.prototype.isProject = verifyProject; // Create a new Lock object under the project object var project.myLock = new Lock(); // Using the prototype we defined, assign the type property project.myLock.type = "project"; // Check the type of the lock to see if it is valid if(project.myLock.isProject()){ write(project.myLock + " has a valid type of " + project.myLock.type); }else{ write(project.myLock + " has an invalid type of " + project.myLock.type); }