Date range generator in JavaScript
Create a generator that generates all dates in a given range.
The JavaScript snippet collection contains a wide variety of ES6 helper functions. It includes helpers for dealing with primitives, arrays and objects, as well as algorithms, DOM manipulation functions and Node.js utilities.
Create a generator that generates all dates in a given range.
A queue is a linear data structure which follows a first in, first out (FIFO) order of operations.
Learn how to capitalize the first letter of a string in JavaScript using array destructuring and String.prototype.toUpperCase()
.
Find the head or tail of a JavaScript array without mutating it.
Did you know that the delay of setTimeout()
and setInterval()
is merely a suggestion?
Use JavaScript to generate a random alphanumeric string of a specified length.
Pretty-printing JSON objects in pretty easy and customizable in JavaScript. Here's the gist of it.
Compare two objects to determine if the first one contains equivalent property values to the second one.
Use the linear search algorithm to find the first index of a given element in an array.
Check if a string is an anagram of another string, handling case-insensitivity and special characters.
Use JavaScript to calculate the greatest common divisor and least common multiple of two or more numbers.
Did you know you can use JavaScript to toggle fullscreen mode for an element on a webpage? Let's learn how!
Learn how to convert text into HTML-safe strings and vice versa using JavaScript.
Learn and understand closures, a core concept in JavaScript programming, and level up your code.
Create a new array out of the two supplied by creating each possible pair from the arrays.
JavaScript uses type coercion in Boolean contexts, resulting in truthy or falsy values. Get a hang of how it all works in this quick guide.
Static and instance methods are pretty easy to distinguish and serve different purposes. Learn all about them in this article.
Did you know there are multiple ways to remove an element from an array? Let's take a look.
Need to reload the current page using JavaScript? Here's the best way to do it, as well as some alternatives.
Learn how to extract values from an array of objects based on a specified key.
Testing your code is important, but mocking can be tricky at times. Here's a quick guide on how to mock global object methods in Jest.
Convert a date to extended ISO format (ISO 8601), including timezone offset.
Email address validation can be much trickier than it sounds. Here's why and my advice on how to approach this problem.
Learn how to extract command-line arguments passed to a Node.js script.