I'm wondering if I can rely on the fact that [1,,2]
only has two keys: 0
and 2
, or if anyone happens to know if any JS engines will also give me a 1
.
Every browser I've tested shows keys 0, 2
, but I don't have older versions available at the moment, or an android phone, or ...
Reasoning:
I'm writing a custom timer library on top of requestAnimationFrame
and so am returning cancelable ids based on internal array indices. I'm trying to figure out if simply delete ary[ix]
is sufficient to be able to walk all of the object keys on the array without extra sanity checks.