6e3 -> 6000 eの後の数字は0の数を意味する
イベント発生 → 関数の実行 → ページの再描画
['constructor']['constructor']['constructor']('return this')()['console']['log']('Hello JavaScript!') chargedAmountsTotal() {
return this.chargedAmounts.amounts.reduce(
(accumulator, currentValue) => {
accumulator.amount += currentValue.amount;
return accumulator;
}, {amount:0}
).amount ;
}, 1. メソッド呼び出し:オブジェクトのメソッドとして呼ぶ場合 2. 普通の関数呼び出し:単独で呼び出す場合 3. アロー関数:外側の this をそのまま使う 4. new による呼び出し:新しいオブジェクトを指す 5. bind/call/apply による呼び出し:this を固定する