Created
January 29, 2015 12:45
-
-
Save jordic/c597dffdd18a4d289e6b to your computer and use it in GitHub Desktop.
Fucking javascript prototype inheritance
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
<script> | |
c = function() {} | |
c.prototype.d = {} | |
a = new c() | |
b = new c() | |
a.d.test = 'a' | |
console.log( a.d.test == b.d.test ) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment