Introduction to Semantic Versioning (SemVer)
Learn how semantic versioning works and how to use it to correctly version your software.
30 seconds of code contains a curated collection of code articles covering a wide range of development needs. The collection spans many topics, ranging from simple coding problems to theoretical concepts and development techniques.
Learn how semantic versioning works and how to use it to correctly version your software.
When formatting decimal values in JavaScript, trailing zeros can be undesired. Here's how to deal with them.
Ever wanted to run a function on each animation frame? This article shows you how to do it using Window.requestAnimationFrame()
.
JavaScript ES2020 introduced optional chaining and nullish coalescing. Learn everything you need to know with this quick guide.
Quickly find the minimum or maximum date in an array of dates.
Use a regular expression to check if a string contains only alpha or alphanumeric characters in JavaScript.
Get the time part of a Date object in the format HH:MM:SS.
Ever wanted to iterate over nested iterables in JavaScript? Here's how.
Generate an array, containing the Fibonacci sequence, up until the nth term, using two different approaches.
Learn how you can compare two dates in JavaScript, determining which one comes before or after the other.
Learn how to convert between Map
s and objects in JavaScript.
Here's a quick tip on how to compare and sort arrays of strings, ignoring case and accents.
Learn how to quickly write code to sort JavaScript arrays with this handy one-liner.
Did you know you can differentiate an element's styles when it's in fullscreen mode? Learn how to do it with this code snippet!
Learn how to calculate the angle (theta) between two vectors in JavaScript.
Understanding the differences between synchronous and asynchronous code is a crucial piece of knowledge for every web developer.
Regular expressions are a very useful tool. Save this cheatsheet for when you need to look up their syntax and speed up your development.
Randomness and pure functions don't seem to go hand in hand. But where there's a will, there's a way.
Learn how to generate a random hexadecimal color code with a few lines of JavaScript.
Property enumerability dictates how JavaScript object properties behave in different scenarios.
Learn how to convert an asynchronous function to return a promise in JavaScript.
Naming conventions make code easier to read and understand. Learn how to name your variables in JavaScript with this handy guide.
Calculate the midpoint between two pairs of points in a 2D plane, and beyond.
Determine if the current JavaScript environment is Node.js or a browser.