Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Engaged ,
May 03, 2014 May 03, 2014

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.

TOPICS
ActionScript
239
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 03, 2014 May 03, 2014

use the ARRAY.numeric parameter.

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

Translate
Community Expert ,
May 03, 2014 May 03, 2014
LATEST

use the ARRAY.numeric parameter.

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines