[].entries()
returns an iterator object with all entries
returns key+value for each element
empty elements contain the value undefined
returns an iterable
has next()
to iterate
Required Knowledge
- `const` declaration (Block scope)
- `Array.from()` (Array API)
- protocol (Iterator)
Related Katas
Array API
array.sort()
basicsarray.sort()
can take a compare functionarray.shift()
(as introduced in ES3)array.push()
(as introduced in ES3)Array.from()
Array.of()
array.fill()
array.find()
array.findIndex()
array.entries()
array.keys()
array.values()
array.includes()
array.toReversed()
Difficulty Level
INTERMEDIATE
First Published
18 May 2015
Stats
3 tests to solve