FrontendInterviews.dev

614. Sparse Array map Holes

Easy•

Predict the output.

const arr = [1, , 3]
const out = arr.map((x) => x * 2)
console.log(1 in out, 2 in out)

What is the correct output/behavior?

Select an option and submit your answer.
Next Problem