infinite loop occurs when using array.splice inside a for loop

后端 未结 0 589
挽巷
挽巷 2020-12-07 23:34

I write this code, for inserting the second argument if any of the array items are bigger than it. but suddenly an infinite loop occurs. (\'result.splice(i, 0, num)\' causes

相关标签:
回答
  • 消灭零回复
提交回复
热议问题