Generate a random alphanumeric JavaScript string
Use JavaScript to generate a random alphanumeric string of a specified length.
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.
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.
Preloading content is one of many ways to improve your website's performance.
Learn how to leverage the native fonts of the operating system to get close to a native app feel.
Implement setTimeout()
in a declarative manner, using a custom hook.
Create a countdown timer that prints a message when it reaches zero, using React.
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.
Learn how to check if all values in an array are true or false.