Created
July 17, 2013 19:55
-
-
Save mkoryak/6023894 to your computer and use it in GitHub Desktop.
functional
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
var Person = function(){ | |
var that = {}; | |
var privateVar = 'BLEEEEEE'; //how do i do this with prototypical inhereitance? | |
that.talk = function(){ | |
return "i said "+privateVar; | |
} | |
return that; | |
}; | |
var Me = function(){ | |
var that = Person(); //or i can set it to the prototype of that... | |
that.talk = function(){ | |
return "BLEEEEEEEEEEE!" | |
}; | |
return that; | |
}; | |
var person = Person(); | |
var me = Me(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment