Type Guards and Type NarrowingWhat they are and how to use them6 min read·bradpreston.hashnode.devApr 12
Hoisting in JavaScriptMaybe you’ve heard of hoisting or maybe this is a new term in your learning journey. Either way, understanding how hoisting works will help you understand how your code works. What the heck does hoisting even mean? By definition, when something is “h...4 min read·bradpreston.hashnode.devFeb 13
Throttling function calls in JavaScriptYou’re at a water park in line for your favorite water slide. Only one person is allowed to go down the slide every 15 seconds. This is implemented for safety. If every person when right after the other, we would have backups in the slide or injuries...4 min read·bradpreston.hashnode.devMar 2, 2025
Preventing CLS with Dynamic ImagesWhen adding images to our websites, it’s crucial to prevent the layout from shifting while the image loads. Cumulative Layout Shift (CLS) can be described as unexpected movement while the page content is loading. For example, you go to click on a but...3 min read·bradpreston.hashnode.devFeb 26, 2025
Handling events on multiple items in JavaScriptUsing closest on a list of elements3 min read·bradpreston.hashnode.devFeb 16, 2025