PrepAway - Latest Free Exam Questions & Answers

You are developing a website that helps users locate restaurants in their area from a browser. You created a f

You are developing a website that helps users locate restaurants in their area from a browser. You created a function named findRestaurants().

The function must:

Get the current latitude and longitudeof the users device

Pass the users location to findRestaurants()

You must ensure that the application accesses the geolocation information from the device before searching for restaurants.

Which code segment should you use?



A. Option A

B. option B

C. Option C

D. Option D

Explanation:

References:

https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition


Leave a Reply