If you .push to an array with 2 holes, you just add new elements at index 2 and 3. The holes at 0 and 1 are still there. It would be HOLEY_SMI_ELEMENTS.
-
-
Sorry, bad example (Im sleepy) -__-' I wanted to say: arr[0] = 1; arr[1] = 2; (Instead of the push operation). So the former holey array is now filled with numbers. When I clone it with the slice function, is the "new" array still HOLEY?
-
I just checked, and currently, it’s still `HOLEY_SMI_ELEMENTS` even after the `slice`. I see your point though, and we might be able to avoid creating a new HOLEY array in this case in the future.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.