const DrawChess = (x = 8, y = 8) => {
const TOTAL_CELL = x * y;
let offset = false;
let accum = "";
for (let i = 1; i <= TOTAL_CELL; i++) {
if (offset) {
accum += i % 2 ? "#" : " ";
} else {
accum += i % 2 ? " " : "#";
}
if (i % x === 0) {
offset = !offset;
accum += "\n";
}
}
return accum;
};