Pls tell me what am I missing

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

<script>
// Add your code below this line
if (navigator.geolocation) {

navigator.geolocation.getCurrentPosition(function(position) {

  $("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);

});

}

// Add your code above this line
</script>
<h4>You are here:</h4>
<div id="data">

</div>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36

Challenge: Get Geolocation Data to Find A User’s GPS Coordinates

Link to the challenge:

All you have to do is copy/paste code from description.

witch description the description of my code or challnge

Challenge description. It says right there:

Add the example code inside the script tags to check a user’s current location and insert it into the HTML.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.