标签:OLE log span class style cti else code turn
1 var data = [‘a‘, ‘b‘, ‘c‘, ‘d‘]; 2 function getGroup(data, index = 0, group = []) { 3 var newArr = []; 4 newArr.push(data[index]); 5 for (var i = 0; i < group.length; i++) { 6 newArr.push(group[i] + ‘,‘ + data[index]); 7 } 8 group.push(...newArr); 9 // group.push.apply(group, newArr); 10 if (index + 1 >= data.length) return group; 11 else return getGroup(data, index + 1, group); 12 } 13 console.log(getGroup(data));
标签:OLE log span class style cti else code turn
原文地址:https://www.cnblogs.com/xfcao/p/10918382.html