let arr = [2,3,4,5,6] let delInd = [0,2,3] for(let i = 0;i < delInd.length ;i++){ arr.splice(delInd[i]-i,1) }