Created
September 17, 2018 08:12
-
-
Save Lodo4ka/6c9cfe0d77188b04ec3dee11d92f5ba9 to your computer and use it in GitHub Desktop.
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 Temp = function () {}; | |
Temp.prototype = parent.prototype; | |
child.prototype = new Temp(); | |
} | |
inherit(F2, F); | |
function inherit(child, parent) { | |
child.prototype = Object.create(parent.prototype); | |
} | |
function inherit(child, parent) { | |
child.prototype = Object.create(parent.prototype); | |
child.parent = parent; | |
} | |
F2.parent.prototype.setName.call(this, name); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment