sortメソッド

構文
myArray = new Array("red", "green", "blue", "yellow", "purple");
  document.write("並び替え前", myArray);
  document.write("並び替え後", myArray.sort());

実行結果