Object.entries() reference
13 March 2024 (Updated 13 March 2024)
Object.entries() takes an object as an argument and returns an array with the same length as the number of properties in the object where each array item has two elements and corresponds to a property in the object:
[0]
: The key of the object.[1]
: The value of the key in the object.
For example:
Will return:
Tagged:
JavaScript
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment