I have a list of sounds like so:
[
[ 'b', 'v' ],
[ 'a' ],
[ 'n', 't' ]
]
I need to produce a list of all combinations there sounds can make. The desired output is:
[
'ban',
'van',
'bat',
'vat'
]
The best I have been able to come up with so far is a hard-coded solution but the solution must be flexible to accommodate any length of array. Any ideas? thx