Which JavaScript call gets the current position of a device?
- device.getLatLng()
- navigator.gps.read()
- window.location.get()
- navigator.geolocation.getCurrentPosition()
Answer
D) navigator.geolocation.getCurrentPosition()
The Geolocation API's getCurrentPosition() returns coordinates after user permission.
Computer Science MCQ · More HTML5 for Mobiles MCQs · Practise