Skip to content

Commit

Permalink
Update files/zh-cn/web/javascript/reference/operators/this/index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yin1999 authored Nov 8, 2023
1 parent 6d584e8 commit 7f51c54
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ console.log(typeof getThisStrict()); // "undefined"

在非严格模式下,一个特殊的过程称为 [`this` 替换](/zh-CN/docs/Web/JavaScript/Reference/Strict_mode#非_this_替换)确保 `this` 的值总是一个对象。这意味着:

- 如果一个函数被调用时 `this` 被设置为 `undefined``null``this` 会被替换为{{jsxref("globalThis")}}。
- 如果一个函数被调用时 `this` 被设置为 `undefined``null``this` 会被替换为 {{jsxref("globalThis")}}。
- 如果函数被调用时 `this `被设置为一个原始值,`this` 会被替换为原始值的包装对象。

```js
Expand Down

0 comments on commit 7f51c54

Please sign in to comment.