Skip to main content

Matt Smith

  • About
  • Contact
Web Dev | Front-End Engineer | UX Designer

Understanding Promise.any(): when one success is enough

2 min read
703 views

Promises have long been our go-to when working with asynchronous code in JavaScript. If you’ve used Promise.all() or Promise.race() to coordinate async operations, you know the patterns. But what if you’re only interested in the first successful result, ignoring failures? That’s exactly what Promise.any() does: it fulfills with the first...

  • JavaScript

Logical assignment operators in JavaScript: small syntax, big wins

2 min read
6871 views

In day-to-day JavaScript, we often write code that checks a variable before assigning it a new value. These checks can get repetitive, especially when working with component props, global configs, or state objects. That’s where logical assignment operators come in, a compact ES2021 feature that simplifies common conditional assignments without...

  • JavaScript
  • React

Modern async iteration in JavaScript with Array.fromAsync()

2 min read
3192 views

As front-end engineers, we frequently deal with asynchronous data, such as API responses, streams, lazy-loaded content, and more. JavaScript has long provided tools for managing async logic, but working with async iterables has often required verbose or manual handling. Enter Array.fromAsync(), a modern addition to JavaScript that simplifies the process...

  • JavaScript
Older posts
Twitter
LinkedIn
GitHub
CodePen
© 2025 Matt Smith. All rights reserved.