David Walsh Blog

JavaScript, HTML5, AJAX, PHP, CSS, and ∞.

Latest articles

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 Request One problem we instantly complained about with promises was not being able...

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 now we get more — logical assignment operators. Let’s check out how they can...

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 when using emojis in Facebook — sometimes Facebook would replace an emoji with one of their own custom images,...

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 working isn’t quick, especially if they don’t accept cross-origin requests. ...

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 the string contains accented characters? Characters like ğ...

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 and build excellence in their development team culture. I’ve always considered myself...

How to Earn Interest with Bitcoin

When I was young I remember looking at my bank book and seeing nice interest payments for cash I had in the bank. Fast forward to today and banks are giving essentially nothing for interest — your money just sits there collecting dust. In an ideal world you could put it into the stock market but there always funds that you can’t put at risk. That...

Promise.allSettled

The Promise object has many useful functions like all, resolve, reject, and race — stuff we use all the time. One function that many don’t know about is Promise.allSettled, a function that fires when all promises in an array are settled, regardless of whether any of the promises are resolved or rejected. Promise.all is great but then isn’t called...

Tips for Starting with Bitcoin and Cryptocurrencies

One of the most rewarding experiences of my life, both financially and logically, has been buying and managing cryptocurrencies like Bitcoin, Litecoin, Ethereum. Like learning any other new tech, I made rookie mistakes along the way, but learned some best practices along the way. Check out these tips for starting with cryptocurrencies! You Don’t...

Binding Arguments with Bind

One of my favorite and most essential Function method is bind, a function we added to MooTools when it wasn’t featured in the JavaScript language itself. We often think of using bind to simply bind a method’s call to its host object, but did you know you can also bind arguments with the host object? You’ve probably done something like this:...

Discover, share and read the best on the web

Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters! Get unfiltered news feeds or filter them to your liking.

Get Inoreader
Inoreader - Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters!