mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 10:22:23 +00:00
此处参数有误
// 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.
This commit is contained in:
parent
2be52481a2
commit
ef89f58f61
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user