Answered
using .sort() to sort an array of numbers NOT as strings
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.
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.
use the ARRAY.numeric parameter.
(and you can always use a custom sort function parameter for more customized sorts.)
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.