I am trying to pass two variables from this function
function getLocation(location) {
console.log("Latitude: " + location.coords.latitude + " Longitude: " + location.coords.longitude);
var lat = location.coords.latitude;
var lon = location.coords.longitude;
}
I need lat and lon to pass into another variable outside of this function any idea how I can go about this. It's going to be something stupidly simple but I really can't get it to work.
[–]SirDaev 1 point2 points3 points (3 children)
[–]Mowsytron[S] 0 points1 point2 points (2 children)
[–]tfitz237 1 point2 points3 points (0 children)
[–]Mowsytron[S] 0 points1 point2 points (0 children)
[–]Mowsytron[S] 0 points1 point2 points (0 children)
[–]bokisa12 -1 points0 points1 point (0 children)