// Define the method that we prototyped function verifyODBC(){ // Check to see if the type property we added is set to a valid value if(this.type == "ODBC"){ return true; }else{ return false; } } // Create a new property and method of the database object. database.prototype.type = null; database.prototype.isODBC = verifyODBC; // Open a connection var myConn = database.connect("ORACLE", "mySID", "myApp", "appsPWD", "myTNS"); // Using the prototype we defined, assign the type property myConn.type = "Oracle"; // Check the type of the connection to see if it is valid if(myConn.isODBC()){ write(myConn + " has a valid type of " + myConn.type); }else{ write(myConn + " has an invalid type of " + myConn.type); }