entries()

Gets an array of pairs (array of length 2) indicating all of the keys and values within a given array or object.

This function is valid in v2.1.0 to v2.6.0. This function has been downloaded 0 times.

Parameters

{Array|Object} arrOrObj
Array or object to traverse to get all of the key/value pairs.
{boolean=} opt_includeInheritance Optional, Default:false
Indicates whether inherited key/value pairs should be included in the returned array of entries.

Returns

{Array.<Array>}
An array of pairs (arrays where the first item is the key and the second is the value).

Required Function

This function requires the following function which is included automatically:

  • forOf()
    Traverses all the characters in a string or all of the items in an array or an object, executing a function on each one.