Skip to main content

Matt Smith

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

Logical assignment operators in JavaScript: small syntax, big wins

July 28, 2025
2 min read
0 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()

July 14, 2025
2 min read
2388 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

Default parameters: your code just got smarter

June 29, 2025
2 min read
753 views

Whether you’re building UI components, calling APIs, or writing some utility functions, it’s quite common to deal with optional function arguments. Traditionally, you’d fall back on if statements or logical ORs to assign default values. But let’s be honest, that can lead to subtle bugs. How often have you written...

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