concat-2d-array
https://github.com/lihang90/concat-2d-array
Split 2d array items to concat to new 2d array
Just like
1 2 3 4 5 6
convert to
1 3 5 1 3 6 1 4 5 1 4 6 2 3 5 2 3 6 2 4 5 2 4 6
How to use
- npm install
$ npm install concat-2d-array --save
- use
const concat2dArray = ; const tempArr = 1 2 3 4 5 6 ; const result = ; console;/* [ [1, 3, 5], [1, 3, 6], [1, 4, 5], [1, 4, 6], [2, 3, 5], [2, 3, 6], [2, 4, 5], [2, 4, 6] ]*/
How to test
$ npm install && npm test