Travis build: 1405

This commit is contained in:
30secondsofcode
2018-01-24 15:19:07 +00:00
parent ee39189dff
commit c1feb95e64
3 changed files with 4 additions and 4 deletions

View File

@ -2246,10 +2246,10 @@ without([2, 1, 2, 3], 1, 2); // [3]
Creates a new array out of the two supplied by creating each possible pair from the arrays.
Use `Array.map()` to produce every possible pair from the elements of the two arrays.
Use `Array.reduce()`, `Array.map()` and `Array.concat()` to produce every possible pair from the elements of the two arrays and save them in an array.
```js
const xProd = (a, b) => a.map(x => b.map(y => [x, y]));
const xProd = (a, b) => a.reduce((acc, x) => acc.concat(b.map(y => [x, y])), []);
```
<details>