ES6—22:Object.defineProperty()方法

Basic parameters


Usage examples

  • enumerable: true will make the set parameter can be traversed, otherwise it cannot be traversed
  • configurable: true will make the attribute of this parameter cannot be deleted, the default is false

Guess you like

Origin blog.csdn.net/sinat_41696687/article/details/113879393