JavaScript Object entries() Method
Last Updated : 17 Mar 2025
JavaScript Object.entries() method is used to return an array of a given object's own enumerable property [key, value] pairs. The ordering of the properties is the same as that given by looping over the property values of the object manually.
Syntax:
Parameter
Obj: It is an object whose enumerable property [key, value] pair are to be returned.
Return value:
This method returns an array of the given object's own enumerable property [key, value] pairs.
Browser Support:
| Chrome | 38 |
| Edge | Yes |
| Firefox | 28 |
| Opera | No |
Example 1
Output:
Example 2
Output:
Example 3
Output: