Collect.js | crossJoin() Method
The crossJoin() method cross joins the collection with an array or collection and return all possible permutations between them.
- Collect.js can be installed via NPM:
npm install --save collect.js
- You can also use CDN of collect.js
Parameters: The collect() takes one argument that is converted into the collection and then crossJoin() function also take an array.
Return Value: Returns an array with all possible permutation of between them.
Example: Here collect = require(‘collect.js’) is used to import the collect.js library into the file.