How to detect location hash changes in Javascript
Introduction To detect the browser location hash changes in Javascript, there’s a web API event called hashchange. Which we can rely on to detect the change in…
Conditionally add a new property to JS objects
Introduction Recently, I published an article about How to spread objects in Javascript conditionally. This article won’t have much difference from the previous one, it rather demonstrates…
How to conditionally spread objects in Javascript
Introduction In Javascript, If we want to spread an object into another one, we usually use the spread syntax operator (…) to do so. Like the following:…
How to dynamically inject JS/CSS into a webpage
Introduction Working with the new frontend tech stacks is fun, however, in some cases, it might be challenging there’s a need to host the frontend application in…
The Complete Guide About Javascript IIFE
Through this article, we will go through the details of Javascript Immediately Invoked Function Expression (IIFE). Introduction An Immediately-invoked Function Expression (known as Self-executing anonymous functions) is…