Skip to main content
Inspiring
May 3, 2014
Answered

using .sort() to sort an array of numbers NOT as strings

  • May 3, 2014
  • 1 reply
  • 274 views

Hi,

is there a function or simple way to sort an array of numbers in order of their values and not as strings? E.g, have 100 come AFTER 9; (9, 100) not (100, 9).

Thanks.

This topic has been closed for replies.
Correct answer kglad

use the ARRAY.numeric parameter.

(and you can always use a custom sort function parameter for more customized sorts.)

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
May 3, 2014

use the ARRAY.numeric parameter.

(and you can always use a custom sort function parameter for more customized sorts.)