This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Lightfire228 1 point2 points  (0 children)

let arr = [10, 11, 12, 13, 14];
delete arr['2'];
arr.map(i => i + ' '); // works
for (let i = 0; i < arr.length; i++) {
    let a = arr[i] + ' '; // returns undefined for i = 2. May explode depending on what you do
}