Can you solve this problem if you know the basics of JS?

An array of arrays is provided, and your job will be to return the number of unique arrays that can be formed by selecting exactly one element from each subarray.
For example :, solve ([[1,2], [4], [5,6]]) = 4because it only leads to 4 possibilities. They are [1,4,5], [1,4,6], [2,4,5], [2,4,6].
Make sure you don't count duplicates; eg solve ([[1,2], [4,4], [5,6,6]]) = 4, since the additional results are just duplicates.JavaScript Anonymous, Aug 19, 2019 
Can. The task is not to know the language, but to algorithmization and logical thinking.
P.S. you can even solve mathematically, in factAnonymous 
did not understand the essence of the problem, but you can, you can do everything that you can "describe on paper"Anonymous
2 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!