1.

Which property is like the GPS in car?(a) watchPosition()(b) clearWatch()(c) getCurrentPosition()(d) showPosition()I got this question in a job interview.Query is from Geolocation API topic in portion HTML Fonts, Tags and Elements of HTML

Answer»

The correct choice is (a) watchPosition()

Easiest EXPLANATION: Current position of the USER is returned by watdhPosition(). It update the position os th user as the user moves just like the GPS installed in a CAR. WatchPosition() METHOD is stopped by clearWatch() method. E.g. if(navigator.geolocation){navigator.watchPosition(showPosition);}



Discussion

No Comment Found

Related InterviewSolutions