Descripción
Create an empty 2D array with fixed rows and columns
File Template: ❌
Prefix
arr2:new
Scopes
javascript
Snippet de código
const ${1:matrix} = Array.from({ length: ${2:rows} }, () => new Array(${3:cols}));
Create an empty 2D array with fixed rows and columns
arr2:new
javascript
const ${1:matrix} = Array.from({ length: ${2:rows} }, () => new Array(${3:cols}));