Below is a simple code that I made,
var array:Array =
[
"44,5",
"44,3",
"44,2",
"44,1",
"44,4",
"44,6",
"5,99"
];
array.sort();
displayArray(array);
function displayArray(array:Array):void
{
for(var i:int = 0; i < array.length; i++)
{
trace(array*);
}
}
[COLOR=“Red”]It traces…[/COLOR]
44,1
44,2
44,3
44,4
44,5
44,6
5,99
[COLOR=“Green”]I expected it to be…[/COLOR]
5,99
44,1
44,2
44,3
44,4
44,5
44,6
[COLOR=“DarkOrchid”]Anyone knows how to solve this?[/COLOR]