getWeatherData();
function getWeatherData(){
navigator.geolocation.getCurrentPosition((success) => {
console.log(success)
})
}
It returns an object with lat, long and other info, but how? Success is literally a parameter and has no value, right? It's not defined anywhere and I didn't pass a value in when I invoked the function.
Can someone explain to me how this works?