读取属性的特性

  1. 使用 ES 5 提供的 Object.getOwnPropertyDescriptor() 方法;

  2. 两个参数

    • 属性所在的对象
    • 属性名称
  3. 返回值是 由描述符组成的对象

  4. IE 9+ 支持。