Sorting An Array In Javascript