ObjectBaseline · Widely available
Objects in JavaScript are collections of key-value pairs.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jul 29, 2015. Widely available since Jan 29, 2018.
Browser support
DesktopChrome
1+Supportedsince Dec 11, 2008
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1+Supportedsince Nov 9, 2004
Current: 157Safari
1+Supportedsince Jun 23, 2003
Current: 27MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157Safari iOS
1+Supportedsince Jun 29, 2007
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: Object.
Feature detection
JS · check before using
if (typeof Object !== "undefined") {
// Object is available
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (37). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Object | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| Object.Object | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| Object.assign | 45 | 12 | 34 | 9 | 45 | 34 | 9 |
| Object.constructor | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| Object.create | 5 | 12 | 4 | 5 | 18 | 4 | 5 |
| Object.defineProperties | 5 | 12 | 4 | 5 | 18 | 4 | 5 |
| Object.defineProperty | 5 | 12 | 4 | 5.1 | 18 | 4 | 6 |
| Object.entries | 54 | 14 | 47 | 10.1 | 54 | 47 | 10.3 |
| Object.freeze | 6 | 12 | 4 | 5.1 | 18 | 4 | 5 |
| Object.fromEntries | 73 | 79 | 63 | 12.1 | 73 | 63 | 12.2 |
| Object.getOwnPropertyDescriptor | 5 | 12 | 4 | 5 | 18 | 4 | 5 |
| Object.getOwnPropertyDescriptors | 54 | 15 | 50 | 10 | 54 | 50 | 10 |
| Object.getOwnPropertyNames | 5 | 12 | 4 | 5 | 18 | 4 | 5 |
| Object.getOwnPropertySymbols | 38 | 12 | 36 | 9 | 38 | 36 | 9 |
| Object.getPrototypeOf | 5 | 12 | 3.5 | 5 | 18 | 4 | 5 |
| Object.hasOwnProperty | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| Object.is | 19 | 12 | 22 | 9 | 25 | 22 | 9 |
| Object.isExtensible | 6 | 12 | 4 | 5.1 | 18 | 4 | 5 |
| Object.isFrozen | 6 | 12 | 4 | 5.1 | 18 | 4 | 5 |
| Object.isPrototypeOf | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
Show 17 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Object.isSealed | 6 | 12 | 4 | 5.1 | 18 | 4 | 5 |
| Object.keys | 5 | 12 | 4 | 5 | 18 | 4 | 5 |
| Object.preventExtensions | 6 | 12 | 4 | 5.1 | 18 | 4 | 5 |
| Object.preventExtensions.ES2015_behavior | 44 | 12 | 35 | 9 | 44 | 35 | 9 |
| Object.propertyIsEnumerable | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| Object.seal | 6 | 12 | 4 | 5.1 | 18 | 4 | 5 |
| Object.setPrototypeOf | 34 | 12 | 31 | 9 | 34 | 31 | 9 |
| Object.toString | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| Object.valueOf | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| Object.values | 54 | 14 | 47 | 10.1 | 54 | 47 | 10.3 |
| shorthand_object_literals | 43 | 12 | 33 | 9 | 43 | 33 | 9 |
| object_initializer | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| object_initializer.computed_property_names | 47 | 12 | 34 | 8 | 47 | 34 | 8 |
| object_initializer.shorthand_method_names | 47 | 12 | 34 | 9 | 47 | 34 | 9 |
| object_initializer.shorthand_property_names | 47 | 12 | 33 | 9 | 47 | 33 | 9 |
| object_initializer.spread_properties | 60 | 79 | 55 | 11.1 | 60 | 55 | 11.3 |
| optional_chaining | 80 | 80 | 74 | 13.1 | 80 | 79 | 13.4 |