Menu
Ok, I’m trying to sort an array using .sort() function. It has some strange behaviour. The following are numbers my script gave before being sorted, and after. For some reason they are not always being sorted. check it out:
[quote]
CASE 1
Pre-Sort:
16
11
11
16
14
6
Post-Sort:
11
11
14
16
16
6
CASE 2
Pre-Sort:
16
10
9
15
15
13
Post-Sort:
10
13
15
15
16
9
Strange isn’t it? If any can help I’d really appreciate it, I’m at a total loss. If there’s any information i’m not including that would help let me know.