1.0.0 • Published 4 years ago
create-matrix v1.0.0
create-matrix
Create an array matrix.
Install
npm install create-matrix
Usage
const createMatrix = require("create-matrix");
createMatrix(2, 3, 0);
/*[
[0, 0, 0],
[0, 0, 0]
]*/
API
createMatrix(rows, columns, value?)
rows
Type: positive integer
The rows to create.
columns
Type: positive integer
The columns to create.
value
Type: any
\
Default: empty
The default value to insert.
1.0.0
4 years ago