js 串N排列组合
数组:[
["1@1.5","1_1@1.6"],
["2@1.5"],
["3@1.5"],
]
第一步:
让数组里面每个元素不重复组合
结果如下:
["1@1.5","2@1.5","3@1.5"]
["1_1@1.5","2@1.5","3@1.5"]
共2种结果
----------------
拓展:
N值=2
结果如下:
["1@1.5","2@1.5"]
["2@1.5","3@1.5"]
["1@1.5","3@1.5"]
["1_1@1.5","3@1.5"]
["1_1@1.5","2@1.5"]
-------------------