TypeScript-Handbook icon indicating copy to clipboard operation
TypeScript-Handbook copied to clipboard

`this` is a keyword, not a variable

Open cluxter opened this issue 4 years ago • 0 comments

In the Functions page, in the this and arrow functions section, we can read:

In JavaScript, this is a variable that’s set when a function is called.

This is wrong. The Standard ECMA-262, clause 12.2.2 couldn't be more explicit:

12.2.2 The this Keyword

This is a keyword, not a variable.

cluxter avatar Jul 24 '20 13:07 cluxter