function renderBoard(board) {
    var elBoard = document.querySelector('.board');
    var strHTML = '';
    for (var i = 0; i < board.length; i++) {
        strHTML += '<tr>';
        for (var j = 0; j < board[0].length; j++) {
            // CR: Unnecessary variable.
            // CR: You only use it for i and j, and you have it from the loop.
            var currCell = board[i][j];

            var cellClass = getClassName({ i: i, j: j })

            // CR: inline styling again.
            strHTML += `<td class="cell ${cellClass}" onmousedown="cellClicked(event, 
                        ${currCell.i}, ${currCell.j})" style="cursor: pointer">`

            strHTML += '</td>';
        }
        strHTML += '</tr>';
    }
    elBoard.innerHTML = strHTML;

}
//Print the board as a <table> to the page
Print the board as a  to the page
Print the board as a to the page
function renderBoard(board) {
    var elBoard = document.querySelector('.board');
    var strHTML = '';
    for (var i = 0; i < board.length; i++) {
        strHTML += '<tr>';
        for (var j = 0; j < board[0].length; j++) {
            var currCell = board[i][j];
            var cellClass = getClassName({ i: i, j: j })
            strHTML += `<td class="cell ${cellClass}" onmousedown="cellClicked(event, 
                        ${currCell.i}, ${currCell.j})" style="cursor: pointer">`
            strHTML += '</td>';
        }
        strHTML += '</tr>';
    }
    elBoard.innerHTML = strHTML;
}
function renderBoard ( board ) { var elBoard = document . querySelector ( '.board' ) ; var strHTML = '' ; for ( var i = 0 ; i < board . length ; i ++ ) { strHTML += '<tr>' ; for ( var j = 0 ; j < board [ 0 ] . length ; j ++ ) { var currCell = board [ i ] [ j ] ; var cellClass = getClassName ( { i : i , j : j } ) strHTML += ` ${ cellClass } ${ currCell . i } ${ currCell . j } ` strHTML += '</td>' ; } strHTML += '</tr>' ; } elBoard . innerHTML = strHTML ; }
Print the board as a <table> to the page
Print the board as a <table > to the page
// CR: Unnecessary variable. // CR: You only use it for i and j, and you have it from the loop. // CR: inline styling again.