Object.entries() JavaScript

The Javascript Object entries() method gives an array with enumerable property key-value pairs of a specified object. Syntax: Object.entries(object) Parameters: object: It represents the object whose enumerable property key-value pairs have to be get. Return: An array with enumerable property key-value pairs. Example: <!DOCTYPE html> <html> <body> <script> const a = { 10: ‘BRONZE’, 20: … Read more