Fixed it up for ya. You had a couple of concepts wrong:
function arenaSweep() {
for(let y = arena.length-1; y >= 0; y--){
const row = arena[y];
let filled = true;
for(let x = 0; x < row.length; x++){
if (row[x] === 0) {
filled = false;
break;
}
}
if (filled) {
arena.splice(y,1);
row.fill(0);
arena.unshift(row);
y++;
}
};
}
The conditional in your for loop had the wrong direction (y < 0 should be y >= 0) for reverse loops.
Next you assumed continue
would break out of the inner loop so you could start checking next row; however, it's break that stops the current loop. Continue just made you move to the next iteration of the nested loop.
I also optimized a little by reducing array calls.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…