JavaScript Object.entries() MethodJavaScript 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:ParameterObj: 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:
Example 1Output: ["23", "carry"] Example 2Output: ["3", "carry"] Example 3Output: ["10", "arvind"]
Next TopicJavaScript Objects
|