I was running tests on javascript
and I noticed that when I use the delete
function at an index of array
, array
continues with the same size.
Example:
a = [1, 2, 3]
delete a[1]
console.log(a.length); // Imprime 3
Why does this happen?