Created
July 8, 2017 15:48
-
-
Save goofmint/ba85318680d7ca849b9233ad2816ac87 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
method: { | |
constructor: function (initialValue) { | |
// 親クラスのコンストラクタ呼び出し | |
super_.constructor.call(this); | |
// 初期値を設定(インスタンス生成時に指定) | |
this._count = initialValue; | |
// 初期値を設定(直接指定) | |
this.scale = 1; | |
}, | |
increment: function () { | |
++this._count; | |
return; | |
}, | |
getValue: function () { | |
return this._count * this.scale; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment