Sort Function In Array In Javascript