Skip to content

Commit abced61

Browse files
committed
Add a ES5 note
1 parent 20aca47 commit abced61

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/this.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ can be bound in the language.
1010

1111
When using `this` in global scope, it will simply refer to the *global* object.
1212

13+
1314
### Calling a function
1415

1516
foo();
1617

1718
Here `this` will again refer to the *global* object.
1819

20+
> **ES5 Note:** In strict mode, `this` will **no longer** refer to the global object.
21+
> It will instead have the value of `undefined`.
22+
1923
### Calling a method
2024

2125
test.foo();

0 commit comments

Comments
 (0)