let matrix = [
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[]
];
[...Array(12)].map(row => [...Array(31)])
[...Array(12)].map((row, x) =>
[...Array(31)].map((col, y) => x * 31 + y)
)
npm install ml-matrix
документацияimport { Matrix } from 'ml-matrix';
const matrix = new Matrix(12, 31);