DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
javascript cartesian product
const cartesian = (...a) => a.reduce((a, b) => a.flatMap(d => b.map(e => [d, e].flat())));
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#javascript
#cartesian
#product
ADD COMMENT
Topic
COMMENT
Name
9+9 =
Submit