>> Both the concern of `someObj.hasOwnProperty(somePropertyName)` attempting to
>> call the `hasOwnProperty` property of `someObj` rather than walking the
>> prototype chain to get `Object.prototype.hasOwnProperty`, and the >> concern
>> of `someObj` having a null prototype (or otherwise not having
>> `Object.prototype.hasOwnProperty` on its prototype chain) can be avoided
>> with the `{}.hasOwnProperty.call(someObj, somePropertyName)` pattern.
Hi,
Yeah, sure. But it could be cleaner to do:
```js
Object.hasOwnProperty(myObj, someName)
```
instead of
```js
{}.hasOwnProperty.call(myObj, someName)
```
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss