alhassy / alhassy/JavaScriptCheatSheet

`this` is not tied to the function

未關閉
#5 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
help wanted
主要語言
沒有語言資料
星號
221
分支
23
PR 合併指標
30 天內沒有已合併 PR

描述

There's a section called:

> The this of Parent Scopes

And it starts by saying:

> Since each function has its own `this` binding, whose value depends on the way it is called, you cannot refer to the `this` of the wrapping scope in a regular function defined with the function keyword.

This is incorrectly worded. There is no concept at all of "the `this` of a scope", as it's not associated to a _scope_. So the title is not correct. Also the explanation will be confusing to novices because it, again, relates `this` to some wrapping _scope_.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。