2013-11-28から1日間の記事一覧

prototype継承するときの順序には気をつける

prototype継承を実装する時の凡ミスが多いです。 function GrandParent() { } function Parent() { } function Me() { } // GrandParentにhelloメソッドを追加 GrandParent.prototype.hello = function() { }; // Parentにworldメソッドを追加 Parent.protot…