Skip to content

Commit 1aa5fd1

Browse files
MrZhang123YuChengKai
authored andcommitted
fix: fix style
1 parent b486542 commit 1aa5fd1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

JS/JS-ch.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -446,17 +446,17 @@ var foo = 1
446446

447447
因为当 JS 解释器在遇到非匿名的立即执行函数时,会创建一个辅助的特定对象,然后将函数名称作为这个对象的属性,因此函数内部才可以访问到 `foo`,但是这个值又是只读的,所以对它的赋值并不生效,所以打印的结果还是这个函数,并且外部的值也没有发生更改。
448448

449-
> ```js
450-
> specialObject = {};
451-
>
452-
> Scope = specialObject + Scope;
453-
>
454-
> foo = new FunctionExpression;
455-
> foo.[[Scope]] = Scope;
456-
> specialObject.foo = foo; // {DontDelete}, {ReadOnly}
457-
>
458-
> delete Scope[0]; // remove specialObject from the front of scope chain
459-
> ```
449+
```js
450+
specialObject = {};
451+
452+
Scope = specialObject + Scope;
453+
454+
foo = new FunctionExpression;
455+
foo.[[Scope]] = Scope;
456+
specialObject.foo = foo; // {DontDelete}, {ReadOnly}
457+
458+
delete Scope[0]; // remove specialObject from the front of scope chain
459+
```
460460

461461
# 闭包
462462

0 commit comments

Comments
 (0)