Javascript – Can someone explain why this happen?
const chessBoard = document.querySelector("#board"); let aSwitch = true; // define a switch to create black & white square let increment = 1; // will be use to determine the row of the board for (let i = 0; i <…