From d6045d09c96ed0237af2fe663e546d59b35e923e Mon Sep 17 00:00:00 2001 From: ruanyf Date: Mon, 5 Feb 2018 10:22:21 +0800 Subject: [PATCH] docs(proposals): edit proposals --- docs/proposals.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/proposals.md b/docs/proposals.md index 91f921e..3d65d88 100644 --- a/docs/proposals.md +++ b/docs/proposals.md @@ -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 +``` + ### 注意点 函数的部分执行有一些特别注意的地方。