Skip to content

Commit ef89f58

Browse files
authored
此处参数有误
// 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.
1 parent 2be5248 commit ef89f58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/reflect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ function Greeting(name) {
240240
const instance = new Greeting('张三');
241241

242242
// Reflect.construct 的写法
243-
const instance = Reflect.construct(Greeting, '张三');
243+
const instance = Reflect.construct(Greeting, ['张三']);
244244
```
245245

246246
### Reflect.getPrototypeOf(obj)

0 commit comments

Comments
 (0)