79407229

Date: 2025-02-02 19:52:29
Score: 1
Natty:
Report link

const arr = [1, 2, 3, 4, 5, 6, 7]; // not modified

[...arr].forEach((num, i, currentArr) => {
    if (num === 4) {
        return currentArr.splice(i); // break
    }

    console.log(num);
});

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