Object.hasOwn()
The Object.hasOwn()
static method checks whether an object has a given property. It's a more robust alternative to the Object.prototype.hasOwnProperty()
method.
Status
Baseline Widely Available (since 2024-09-14)
MDN documentation
Specifications
- ECMAScript® 2026 Language Specification (#sec-object.hasown), from TC39 (Ecma International).
Browser support
- Chrome 93 Released on 2021-08-31
- Chrome Android 93 Released on 2021-08-31
- Edge 93 Released on 2021-09-02
- Firefox 92 Released on 2021-09-07
- Firefox for Android 92 Released on 2021-09-07
- Safari 15.4 Released on 2022-03-14
- Safari on iOS 15.4 Released on 2022-03-14
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist