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