This is why you do push - 1 to get the previous po...
# suitescript
a
This is why you do push - 1 to get the previous position/the position where you just inserted and not the new array size...