mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-25 03:02:21 +00:00
docs(proxy): fix proxy #616
This commit is contained in:
parent
52e67f71da
commit
50bd8d09d2
@ -209,7 +209,7 @@ let arr = createArray('a', 'b', 'c');
|
||||
arr[-1] // c
|
||||
```
|
||||
|
||||
上面代码中,数组的位置参数是`-1`,就会输出数组的倒数最后一个成员。
|
||||
上面代码中,数组的位置参数是`-1`,就会输出数组的倒数第一个成员。
|
||||
|
||||
利用 Proxy,可以将读取属性的操作(`get`),转变为执行某个函数,从而实现属性的链式操作。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user