このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
|
js:object:basic [2021/05/24 12:56] tanaka [prototypeオブジェクト] |
js:object:basic [2021/07/19 10:58] (現在) y2sunlight [静的プロパティと静的メソッド] |
||
|---|---|---|---|
| 行 55: | 行 55: | ||
| suzuki.name = ' | suzuki.name = ' | ||
| suzuki.greeting(); | suzuki.greeting(); | ||
| + | </ | ||
| + | |||
| + | === メンバーの有無の判定(in演算子) === | ||
| + | |||
| + | in演算子を使って、メンバーの存在の有無を判定することができます。 | ||
| + | |||
| + | <sxh javascript; | ||
| + | console.log(' | ||
| + | console.log(' | ||
| </ | </ | ||
| 行 94: | 行 103: | ||
| console.log(taro.getSchoolName()); | console.log(taro.getSchoolName()); | ||
| </ | </ | ||
| - | \\ | ||
| + | === メンバーの有無の判定(in演算子) === | ||
| + | in演算子を使って、メンバーの存在の有無を判定することができます。 | ||
| + | |||
| + | <sxh javascript; | ||
| + | console.log(' | ||
| + | console.log(' | ||
| + | console.log(' | ||
| + | console.log(' | ||
| + | |||
| + | console.log(' | ||
| + | console.log(' | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| ===== 組み込みオブジェクト ===== | ===== 組み込みオブジェクト ===== | ||
| 行 146: | 行 168: | ||
| </ | </ | ||
| \\ | \\ | ||
| - | |||
| - | ===== thisキーワード ===== | ||
| - | |||
| - | ^使用場所^参照先^ | ||
| - | |関数外|Globalオブジェクト| | ||
| - | |関数内|Globalオブジェクト(strictモードでundefined)| | ||
| - | |コンストラクタ|対象オブジェクト| | ||
| - | |メソッド|対象オブジェクト| | ||
| - | |イベントリスナー|対象オブジェクト| | ||
| - | |Functionオブジェクトの[[https:// | ||
| - | |Functionオブジェクトの[[https:// | ||