Objects instantiated without a prototype (Object.create(null)
) do not have a hasOwnProperty
method. The former will always work, while the latter will only work on objects with an Object prototype and without a custom hasOwnProperty
implementation.