Count the number of biggest numbers on the board
The second solution

If the input array is empty, the program will crash with an exception.

It's recommended to specify the radix to parseInt calls:

let smallColA = parseInt(sArr[0], 10);


The if(sArr.length &gt; 1){ condition is unnecessary,
the loop condition naturally takes care of that.

Even better, no need to treat the first element specially,
you can initialize smallColA and smallColB to Infinity.
Not only it will be simpler,
but in it will work even when the input array is empty.

The first (naive) solution

You could write this simpler:


if(board[i][j] !== undefined){
    board[i][j]++;
}
else{
    board[i][j] = 1;
}



... using a technique you already used in your other recent question:

board[i][j] = (board[i][j] || 0) + 1;