jskatas.org Continuously Learn JavaScript. Your Way.

Array API: array.entries()

Array.prototype.entries() returns an iterator object with all entries.

Donate to NGO Julenka. Support Ukranians in need. Julenka is an NGO which my brother founded in 2011 to support Ukranian families and kids in need.

[].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