mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-06-04 11:38:04 +00:00
docs(proposals): edit proposals
This commit is contained in:
parent
9be34c0bd8
commit
d6045d09c9
@ -242,6 +242,17 @@ const g = f(?, 1, ...);
|
||||
const g = (x, ...y) => f(x, 1, ...y);
|
||||
```
|
||||
|
||||
函数的部分执行,也可以用于对象的方法。
|
||||
|
||||
```javascript
|
||||
let obj = {
|
||||
f(x, y) { return x + y; },
|
||||
};
|
||||
|
||||
const g = obj.f(?, 3);
|
||||
g(1) // 4
|
||||
```
|
||||
|
||||
### 注意点
|
||||
|
||||
函数的部分执行有一些特别注意的地方。
|
||||
|
Loading…
x
Reference in New Issue
Block a user