T
Thomas 'PointedEars' Lahn
kangax said:Thomas said:kangax wrote: [...]True, however it would appear you have not yet understood whatAugmenting property name lowers the chance of collisions.
.hasOwnProperty() is supposed to do. Cf. ES3F, 15.2.4.5.
What made you think I have not understood what `hasOwnProperty` does?
Because, IIUC, you expected ({}).hasOwnProperty("x") to return `false' as
you assumed that there is no `Object.prototype.x' (`x' being, for example,
`__proto__'), and considered the opposite observation to be a proof of the
methods unreliability. Whereas nothing could be farther from the truth.
And how can one not understand a trivial 4 step algorithm?
Makes me wonder, too. Especially as the "NOTE" below says explicitly that
the prototype chain, and so Object.prototype, is irrelevant here. Or maybe
you have not understood the difference between host-defined and user-defined
properties, or enumerable an non-enumerable properties? I cannot think of
another reason for what you posted on the matter to date.
PointedEars