ES6 - based learning (18): Reflect

Outline

Reflect and, like Proxy, API ES6 are subject only to the operation introduced. Reflect for acquiring the target object behaviors, and Object is similar, but easier to read, provides a more elegant way to operate object.

Some methods clearly belongs in the internal language of the Object ES6 ported to Reflect objects (some methods currently exist on the Object and Reflect objects at the same time), a new method in the future will only be deployed on Reflect objects.

Reflect on some of the methods of the object returned results were modified to make it more reasonable. Reflect object using the function approach to achieve the Object command operation.

Guess you like

Origin www.cnblogs.com/donghuang/p/12459408.html