function product() {
return Array.prototype.reduce.call(arguments, function(as, bs) {
return [a.concat(b) for each (a in as) for each (b in bs)]
}, [[]]);
}
arr4=[['4','4A','4B'],['16D','15D'],['5d','5e']];
alert(product(['4','4A','4B'],['16D','15D'],['5d','5e']);
上記は機能しますが、以下は機能しません。
arr4=[['4','4A','4B'],['16D','15D'],['5d','5e']];
alert(product(arr4);
提案をありがとう