tr:nth-child(odd) td:nth-child(odd) {
background: white;
}
tr:nth-child(odd) td:nth-child(even) {
background: black;
}
tr:nth-child(even) td:nth-child(even) {
background: white;
}
tr:nth-child(even) td:nth-child(odd) {
background: black;
}
.black {
background: black;
}
.white {
background: white;
}
document.querySelector('.info').innerHTML = `
<table>${[...Array(8)].map((n, i) => `
<tr>${[...Array(8)].map((m, j) => `
<td class="${(i ^ j) & 1 ? 'black' : 'white'}"></td>`).join('')}
</tr>`).join('')}
</table>`;