Skip to content

Instantly share code, notes, and snippets.

@Asikur22
Created August 21, 2024 20:45
Show Gist options
  • Save Asikur22/0fd25612a72d8d231920b2e3b273d1dc to your computer and use it in GitHub Desktop.
Save Asikur22/0fd25612a72d8d231920b2e3b273d1dc to your computer and use it in GitHub Desktop.
JS Object Sorting
let sorted_locations = searched_locations.sort( (a, b) => a.distance - b.distance );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment