TypeScript solution: easy and short
\nfunction largestLocal(grid: number[][]): number[][] {\n    let result: number[][] = new Array(grid.length - 2).fill(0).map(x => []);\n    for (let i = 0; i < 
```\nfunction largestLocal(grid: number[][]): number[][] {\n    let result: number[][] = new Array(grid.length - 2).fill(0).map(x => []);\n    for (let i = 0; i < grid.length - 2; i++) {\n        for (let k = 0; k < grid.length - 2; k++) {\n            result[i][k] = Math.max(...grid.slice(i, i + 3).map(row => row.slice(k, k + 3)).flat());\n        }\n    }\n    return result;\n};\n\n```
['TypeScript']