alhassy / alhassy/JavaScriptCheatSheet

`this` is not tied to the function

Đang mở
#5 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
help wanted
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
221
Fork
23
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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_.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.