79105812

Date: 2024-10-19 20:03:20
Score: 0.5
Natty:
Report link

A way with the standard cycle:

var a = [, , , 6, undefined, , 5, , null, 7];
for (var i = a.length - 1; i > -1; i--) {
    if (!(i in a)) a.splice(i, 1);
}

undefined and null are not removed as expected.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: oleedd