1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

docs(reflect): edit reflect

This commit is contained in:
ruanyf 2017-04-22 23:28:32 +08:00
parent b2182920bb
commit 4eb879872c

View File

@ -355,12 +355,12 @@ function MyDate() {
// 旧写法
Object.defineProperty(MyDate, 'now', {
value: () => new Date.now()
value: () => Date.now()
});
// 新写法
Reflect.defineProperty(MyDate, 'now', {
value: () => new Date.now()
value: () => Date.now()
});
```