Open tmd45 opened 7 years ago
https://hatena.github.io/Hatena-Textbook-JavaScript/language/function.html#this-キーワード
a.foo.call({}); // false (this は {} を指す)
ふぁ?!
って思ったら続きにちゃんと書いてあった>ハマりどころ
call 関数のドキュメント。第一引数の thisArg なるほど http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call
call
thisArg
apply 関数のドキュメント http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply
apply
bind 関数のドキュメント http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
bind
(Fat) Arrow Function の this https://developer.mozilla.org/ja/docs/Web/JavaScript/Guide/Functions#Arrow_functions
this
アロー関数は関数を取り囲むコンテキストから this の値をキャプチャーする
https://hatena.github.io/Hatena-Textbook-JavaScript/language/function.html#this-キーワード
ふぁ?!
って思ったら続きにちゃんと書いてあった>ハマりどころ
call
関数のドキュメント。第一引数のthisArg
なるほど http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/callapply
関数のドキュメント http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/applybind
関数のドキュメント http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind