The Journey of #100DaysOfCode (wassim_taleb)

๐ƒ๐š๐ฒ๐Ÿ“: ๐ง๐š๐ฏ๐ข๐ ๐š๐ญ๐จ๐ซ.๐ ๐ž๐จ๐ฅ๐จ๐œ๐š๐ญ๐ข๐จ๐ง ๐ฏ๐ฌ ๐๐š๐ญ๐š๐ฌ๐ž๐ญ.๐ฅ๐จ๐ง๐ ๐ข๐ญ๐ฎ๐๐ž/๐๐š๐ญ๐š๐ฌ๐ž๐ญ.๐ฅ๐š๐ญ๐ข๐ญ๐ฎ๐๐ž

navigator.geolocation and dataset.longitude/dataset.latitude ๐ฌ๐ž๐ซ๐ฏ๐ž ๐๐ข๐Ÿ๐Ÿ๐ž๐ซ๐ž๐ง๐ญ ๐ฉ๐ฎ๐ซ๐ฉ๐จ๐ฌ๐ž๐ฌ in JavaScript.

โ†’ ๐ง๐š๐ฏ๐ข๐ ๐š๐ญ๐จ๐ซ.๐ ๐ž๐จ๐ฅ๐จ๐œ๐š๐ญ๐ข๐จ๐ง is used to get the deviceโ€™s current geographical location.

โ†’ ๐๐š๐ญ๐š๐ฌ๐ž๐ญ.๐ฅ๐จ๐ง๐ ๐ข๐ญ๐ฎ๐๐ž/๐๐š๐ญ๐š๐ฌ๐ž๐ญ.๐ฅ๐š๐ญ๐ข๐ญ๐ฎ๐๐ž are used to store and access custom geographical data attributes on HTML elements.

Although they serve different purposes, they can be used together for various applications, such as comparing a userโ€™s current location to a predefined location stored in an HTML elementโ€™s data attributes.

2 Likes