I was learning from a course and i encountered this code
`
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position){
const {latitude} = position.coords;
const {longitude} = position.coords;
console.log(lat,longitude);
console.log(position);
},
function(){
alert('could not get position');
});
}
`
Can someone please explain me the meaning of this line of code
const {latitude} = position.coords;
and const {longitude} = position.coords;
i would really appreciate an help………
Please someone explain me the meaning of the line of code.