Skip to content

Instantly share code, notes, and snippets.

@Msirkovsky
Created January 13, 2023 08:25
Show Gist options
  • Save Msirkovsky/7279a26d2635064e4f9f3463888a9c12 to your computer and use it in GitHub Desktop.
Save Msirkovsky/7279a26d2635064e4f9f3463888a9c12 to your computer and use it in GitHub Desktop.
const [lat, long] = getCoordinates()
vs.
const [long, lat] = getCoordinates()
//How do you know which one is correct? Even typescript doesn't help you here.
// Better version with a record:
const {lat,long} = getCoordinates()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment