maxAreaOfIsland = function(grid, maxArea = 0) {
    const [ rows, cols ] = [ grid.length, grid[0].length ];
    const seen = new Array(rows).fill().map(() => new Array(cols));

    for (let row = 0; row < rows; row++) {/* Time O(ROWS) */
        for (let col = 0; col < cols; col++) {/* Time O(COLS) */
            const area = getArea(grid, row, rows, col, cols, seen);/* Space O(ROWS * COLS) */

            maxArea = Math.max(maxArea, area);
        }
    }

    return maxArea;
}
https://leetcode.com/problems/max-area-of-island
Time O(ROWS * COLS) | Space O(ROWS * COLS)
@param {number[][]} grid
@return {number}