3 ms·
It removes the property key. It does not remove the index. You can see the distinction in the iterator produced by the array prototype’s keys method which, per
by eyelidlessness 2y ago
It removes the property key. It does not remove the index. You can see the distinction in the iterator produced by the array prototype’s keys method which, per ECMAScript spec chapter 23, yields the array’s indexes. And they are, in fact, determined by the array’s length.
You can delete every property corresponding to an array’s indexes, and you’ll get the same result.