JavaScript Tutorials

  • By
    cookieStore: Async Cookie API

    One pattern in the JavaScript API world that web development veterans will notice is that we've been creating new methods to accomplish what older, grosser APIs once achieved. XMLHttpRequest became the fetch API, some APIs like Battery became async, and there are dozens of other examples.

  • By
    How to Prevent Pasting into an Input

    Every once in a while I get to a website that doesn't allow me to paste into a form input. In most cases it's something to do with login credentials (username and or password) and auth codes. So how are they preventing me from...

  • By
    How to Detect When a Sticky Element Gets Pinned

    The need for position: sticky was around for years before it was implemented natively, and I can boast that I implemented it with JavaScript and scroll events for ages. Eventually we got position: sticky, and it works well from a visual perspective, but I wondered how...

  • By
    How to Create an Async Function via “new Function”

    One thing I love about JavaScript is that there are many ways to accomplish the same task, one such example being creating functions. There are several patterns for functions; one of the last you see used is the new Function method:What if you want...

  • By
    5 Awesome JavaScript Promise Tricks

    The Promise API changed the game in JavaScript. We went from abusing setTimeouts and settling for synchronous operations to doing everything possible to leverage this new async API. Let's check out a handful of awesome Promise API tricks!Cancel a fetch RequestOne problem we...

  • By
    Logical Assignment Operators

    I love JavaScript, it's my favorite programming language, but I love dipping into other languages because they offer a new perspective on coding paradigms. There've been syntax additions to JavaScript that I've seen I found interesting (think ?? in optional chaining) and...

  • By
    Match Emojis with Regular Expressions

    When experimenting with unicode property escapes, to identify accented letters in strings, it reminded me of a question I had a few years ago: what is the best way to identify and then replace emojis in a string? I first noticed this practice...

  • By
    Simple Node.js Proxy

    When I wanted to refresh my React.js skills, I quickly moved to create a dashboard of cryptocurrencies, their prices, and and other aspects of digital value. Getting rolling with React.js is a breeze -- create-react-app {name} and you're off and running. Getting the API...

  • By
    Match Accented Letters with Regular Expressions

    Regular expressions are used for a variety of tasks but the one I see most often is input validation. Names, dates, numbers...we tend to use regular expressions for everything, even when we probably shouldn't.The most common syntax for checking alphabetic characters is A-z but what if...

  • By
    Expanding the Future (of Dev Tooling) with AI

    I'm writing to share some news that I'm genuinely excited about, not even just for me but for the rest of the developer community.Many of you know that I've been working with companies all over the world for nearly a decade, helping their developers learn JS...