Latest Posts

I write about front-end web development. I'm inspired by Nathan Barry's motto, teach everything you know. I also take a lot of inspiration from my friend and mentor, Chris Ferdinandi.

How to check if every item in an array meets a condition

In vanilla JS, you might want to run some code only if every item in an array meets a condition. Let’s look at how you can do just that using the native Array.every() method!

Returning boolean values in JavaScript

In today’s post, I want to talk about a common issue I see in beginners’ code. It’s not wrong, per se, but it can be made more efficient. Here’s a way you can make your code cleaner when returning boolean values.

How to empty an element in vanilla JS

In jQuery, we can remove all child nodes from an element using the empty() method. Let’s create a helper function for this using only vanilla JS.