标签:rate dex generate index console 技术 lte span ==
function generaterArray(min,max,step){ let len = Math.abs(max - min); if(len <= 0) return []; let arr = new Array(len); let cNum = min; let cIndex = 0; function addArr(index,val){ if(cNum >= min && cNum <= max){ arr[index] = cNum; cNum++; cIndex++; addArr(cIndex,cNum) } } addArr(cIndex,cNum); return arr.filter(item => item%step == 0); } console.log(generaterArray(-1,19,3))
。
标签:rate dex generate index console 技术 lte span ==
原文地址:https://www.cnblogs.com/fqh123/p/13172042.html