nerdexam
IBM

LOT-404 · Question #80

Bob is creating an application that allows the user to add their current location to their blog entry. He needs to capture the device's current position. What method would he use to do this?

The correct answer is C. navigator.geolocation.getCurrentPosition(). See the full explanation below for the reasoning.

Question

Bob is creating an application that allows the user to add their current location to their blog entry. He needs to capture the device's current position. What method would he use to do this?

Options

  • Anavigator.geolocation.getLocation();
  • Bnavigator.geolocation.getLocalPosition();
  • Cnavigator.geolocation.getCurrentPosition();
  • Dnavigator.geolocation.getCurrentLocation();

How the community answered

(36 responses)
  • A
    8% (3)
  • B
    14% (5)
  • C
    75% (27)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full LOT-404 Practice