Get user's geo location using JavaScriptThere are a lot of functionalities where you have to get the user's location. Let's consider a simple scenario that you have to show the popup based on user's location. so you have to get the user's location to achieve the requirement. There are 2 ...Apr 19, 2021 · 2 min readdhruvangg.hashnode.dev
Match arrays in JavaScriptCheck if array A has all elements of array B let a = [1,2,3], b = [1,2,3,4], c = [1,2]; let checkEvery = (arr, target) => target.every(el => arr.includes(el)); console.log(checkEvery(b, a)) // true console.log(checkEvery(c, a)) ...Jan 12, 2021 · 1 min readdhruvangg.hashnode.dev
Lazy load ImagesImages are essential for every website and application today. Whether it be marketing banners, product images or logos, it is impossible to imagine a website without images. Sadly though, images are large in size making them the single largest contri...Oct 14, 2020 · 2 min readdhruvangg.hashnode.dev