0

I'm trying to return the position object as a string, with the following code:

window.navigator.geolocation.getCurrentPosition(
      position => console.log(JSON.stringify(position)),
      err => console.log(err)
);

but the return of the log of the previous code is {}.

if I remove the JSON.stringify the log show the object as expected but not as a string.

danillosl
  • 519
  • 3
  • 7
  • 13

0 Answers0