Javatpoint Logo
Javatpoint Logo

JavaScript Object.entries() Method

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:

["23", "carry"]

Example 2

Output:

["3", "carry"]

Example 3

Output:

["10", "arvind"]

Next TopicJavaScript Objects




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA