Created
July 17, 2013 22:53
-
-
Save GengGao/6025270 to your computer and use it in GitHub Desktop.
inherit function
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 inherit(child, parent) { | |
var copy = Object.create(parent.prototype); | |
copy.constructor = child; | |
child.prototype = copy; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment