Beyond this site, I occasionally contribute technical deep-dives and tutorials to
various industry publications. You can find a selection of my freelance guest posts and
featured articles below.
The way JavaScript handles time has evolved significantly, from the built-in Date API to Moment.js and now Temporal. The new standard fills gaps in the original Date API while addressing limitations found in Moment and other libraries.
The ES2015 standard introduced arrow functions to JavaScript. Arrow functions have a simpler syntax than standard functions, but we’ll also see that there are some important differences in how they behave.
URLs are a critical piece of any web app. If your app makes requests to an API, it’s important to craft the correct URLs for these requests. The URL API, supported in all modern browsers, provides a way to parse and manipulate URLs. It provides easy access to the various parts of the URL.
These days, frameworks are all the rage. But sometimes we still turn to DOM manipulation with vanilla JavaScript. The typical pattern for DOM manipulation using vanilla JavaScript is something like this: first, you need to get a reference to the DOM element you want to work with. This is often done with functions like getElementById or querySelector.
Many operations, such as network requests, are asynchronous in nature. One of the most useful and powerful tools for working with asynchronous code is the Promise. In this handbook, you'll learn all about JavaScript Promises and how to use them.
A scroll-linked, or scroll-directed, animation is an animation that is controlled by an element’s scroll position. As you scroll up and down, the animation plays backward and forward.
If you have some text inside a div, and nothing else, the div's height will match the text height. Suppose, though, you have some text and an image. Your text will be aligned at the bottom of the div, which is usually not what you want. In this article, you'll learn a couple of ways to vertically center your text inside a div or other element.
In 2023, browser support for web components (also known as custom elements) is really good. There's never been a better time to start building your own custom elements. In this article, you'll learn the basics of web components and create a very simple web component that shows the current date.
There are many tools available for analyzing your application’s performance. In this article, we will explore the Performance API, which is built into all modern browsers. Browser support for these APIs is very good, even going back as far as Internet Explorer 9.
If you haven't taken up TypeScript yet, now's the time! Start here by learning how TypeScript can benefit your project, and what to be wary of. Type checking is the primary advantage of TypeScript. By adding static typing to the language, we can catch many of these problems at build time. They can be fixed before the code is shipped.
ESLint has a comprehensive set of rules for JavaScript code that cover stylistic choices and prevent common bugs. Using ESLint alone will give your project a boost, but there are ESLint plugins available to add React-specific rules that will help you write solid React applications.
One of the most common uses of JavaScript in web applications is form validation. Client-side form validation gives users near-immediate feedback about whether or not their input data is valid. HTML5 and the modern DOM APIs are already equipped for form validation.