Which code segment should you use?

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 longitude of the user’s device
Pass the user’s location to findRestaurants()
You must ensure that the application accesses the geolocation information from the device before searching forrestaurants.
Which code segment should you use?

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 longitude of the user’s device
Pass the user’s location to findRestaurants()
You must ensure that the application accesses the geolocation information from the device before searching forrestaurants.
Which code segment should you use?

A.
Option A

B.
Option B

C.
Option C

D.
Option D

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



Leave a Reply 1

Your email address will not be published. Required fields are marked *


CasiProgramoMEXAPOWA

CasiProgramoMEXAPOWA

It is right