From ef89f58f61cd96dd90865f5973080cfd64cc40d4 Mon Sep 17 00:00:00 2001 From: Ataotao Date: Fri, 13 Jan 2017 15:53:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A4=E5=A4=84=E5=8F=82=E6=95=B0=E6=9C=89?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit // Reflect.construct 的写法 const instance = Reflect.construct(Greeting, '张三'); Reflect.construct(target, argumentsList[, newTarget]) An array-like object specifying the arguments with which target should be called. --- docs/reflect.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reflect.md b/docs/reflect.md index c6129ef..9113c7f 100644 --- a/docs/reflect.md +++ b/docs/reflect.md @@ -240,7 +240,7 @@ function Greeting(name) { const instance = new Greeting('张三'); // Reflect.construct 的写法 -const instance = Reflect.construct(Greeting, '张三'); +const instance = Reflect.construct(Greeting, ['张三']); ``` ### Reflect.getPrototypeOf(obj)