9.1.7.1 OrdinaryHasProperty ( O, P )

当使用对象 O 和属性键 P 调用抽象操作 OrdinaryHasProperty 时,将执行以下步骤:

  1. 断言:IsPropertyKey(P) 为 true
  2. 使 hasOwn 变为 ? O.[[GetOwnProperty]](P)。
  3. 如果 hasOwn 不为 undefined,则返回 true
  4. 使 parent 变为 ? O.[[GetPrototypeOf]]()。
  5. 如果 parent 不为 null,那么

a. 返回 ? parent.[[HasProperty]](P)。 6.返回 false

results matching ""

    No results matching ""