Skip to content

Instantly share code, notes, and snippets.

View pdtaylor's full-sized avatar

Paul D. Taylor pdtaylor

  • @accentuate-technology-solutions
View GitHub Profile
@pdtaylor
pdtaylor / example2.js
Last active August 29, 2015 14:14
Example 2
(function(){ //opens the closure
//utility function
function extractCode(obj){
return obj.code;
};
//definition of private object Animal
var Animal= function(){
this.name="";
@pdtaylor
pdtaylor / example1.js
Last active August 29, 2015 14:14
Example 1
(function(){ //opens the closure
//definition of private object Animal
var Animal= function(){
this.name="";
};
Animal.prototype={
getAnimal : function(code){
if(code=="c"){