Skip to content

Commit 0f3c498

Browse files
committed
removed use of __proto__
1 parent e9dec7d commit 0f3c498

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

topics/about_prototypal_inheritance.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $(document).ready(function(){
4343
// helper function for inheritance.
4444
// From https://developer.mozilla.org/en/JavaScript/Guide/Inheritance_Revisited
4545
function extend(child, supertype){
46-
child.prototype.__proto__ = supertype.prototype;
46+
child.prototype = supertype.prototype;
4747
}
4848

4949
// "Subclass" Mammal

0 commit comments

Comments
 (0)