Premium

Implement Array.prototype.map

By FrontendAtlas Editorial · Updated Jan 31, 2026

Challenge summary

Recreate JavaScript array mapping with native-style callback context, sparse-array behavior, and length semantics.

What you'll practice

  • Invoke the callback only for array indexes that exist.
  • Preserve source length and holes in the returned array.
  • Ignore elements appended after iteration begins.

What Premium unlocks

Premium unlocks the runnable workspace, behavioral checks, implementation walkthrough, and edge-case discussion.

Free related practice

Public interview reports: Medium (September 2025), LeetCode Discuss (July 2020), Blind (September 2024), Taro (December 2021) · ServiceNow frontend interview questions · Amazon frontend interview questions · ByteDance frontend interview questions · Meta frontend interview questions

Upgrade to FrontendAtlas Premium to unlock this challenge. Already upgraded? Sign in to continue.

Premium is $24 a month or $99 a year, less in many countries.