I went ahead and updated my test gist with an if in test to see what it did.
const slotted = [,,'one'];
let i = 0;
while (i < slotted.length) {
if (i++ in slotted) {
console.log(`${i - 1} is in the array`);
}
}
it, too, will inform us that only an index of 2 exists. This I think further confirms that these items in the array are not "hidden properties" at all.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I went ahead and updated my test gist with an
if in
test to see what it did.it, too, will inform us that only an index of
2
exists. This I think further confirms that these items in the array are not "hidden properties" at all.