Sorting Program In Javascript Regular