This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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