
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
【JavaScript】ES5とES6において、親クラス継承の違い - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
【JavaScript】ES5とES6において、親クラス継承の違い - Qiita
<script> //親 function Phone(brand, price) { this.brand = brand; this.price = price; } Phone.prot... <script> //親 function Phone(brand, price) { this.brand = brand; this.price = price; } Phone.prototype.call = function () { console.log(" give XXX a call") } //子 function smartPhone(brand, price, color, size) { Phone.call(this, brand, price); this.color = color; this.size = size; } smartPhone.prototype = new Phone; //親を呼び出す smartPhone.prototype.constructor = smartPhone; //子 メソッドの追加 smartPhone.proto