1
0
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:
ruanyf 2018-02-26 15:22:47 +08:00
parent 52e67f71da
commit 50bd8d09d2

View File

@ -209,7 +209,7 @@ let arr = createArray('a', 'b', 'c');
arr[-1] // c
```
上面代码中,数组的位置参数是`-1`,就会输出数组的倒数最后一个成员。
上面代码中,数组的位置参数是`-1`,就会输出数组的倒数一个成员。
利用 Proxy可以将读取属性的操作`get`),转变为执行某个函数,从而实现属性的链式操作。