Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// This would be so much easier to read and write...
var position = navigator.geolocation.getCurrentPosition();
console.log(position.coords.latitude);
// So why in the world do we have to write this?
navigator.geolocation.getCurrentPosition(function(position) {
console.log(position.coords.latitude);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment