This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ //opens the closure | |
//utility function | |
function extractCode(obj){ | |
return obj.code; | |
}; | |
//definition of private object Animal | |
var Animal= function(){ | |
this.name=""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ //opens the closure | |
//definition of private object Animal | |
var Animal= function(){ | |
this.name=""; | |
}; | |
Animal.prototype={ | |
getAnimal : function(code){ | |
if(code=="c"){ |
NewerOlder