function solution(board) { var answer = 0; let temp = board const boom = [[-1,1],[0,1],[1,1], [-1,0], [1,0], [-1,-1],[0,-1],[1,-1]] for(let i = 0; i { let [x,y] = item x = x + i y = y + j if(x >= 0 && x = 0 && y < temp[i].length && temp[x][y] == 0){ temp[x][y] = 2 } }) } ..