So let’s say you are making some sort of a game or program in Actionscipt 3 that requires you to sort words in order from longest to shortest. for example:
1 | var word:Array = new Array("this", "is", "a", "list", "of", "randomly","chosen","words", "to", "sort"); |
if you try something like:
1 | trace(word.sort()); |
you will get the following:
a,chosen,is,list,of,randomly,sort,this,to,words