Function composition in JavaScript
Understand the basics of function composition, a fundamental concept in functional programming.
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.
Understand the basics of function composition, a fundamental concept in functional programming.
Implement the Levenshtein distance algorithm in JavaScript to calculate the difference between two strings.
Implement Python's divmod() built-in function in one line of JavaScript.
Generate a UUID in JavaScript using native APIs in both the browser and Node.js.
Ever wanted to initialize an array with a sequence of generated values? Here's a few ways to do it.
Learn how to initialize a 2D array in JavaScript in a handful of different ways.
Initialize and fill a JavaScript array with the specified values, quickly and easily.
Learn how to create an inclusive array with numbers in a range, using a common step difference.
Encode and decode strings with Base64 in JavaScript easily with these code snippets.
Master JavaScript array element removal with these simple techniques.
Circular progress bars are fairly common in the web. Luckily, some new CSS features make it easier than ever to create them.
Learn all you need to know to effectively and efficiently typecheck values in JavaScript.
Learn how to type check for different types of streams in Node.js.
Use these simple tricks to check if a string is uppercase or lowercase in JavaScript.
Use JavaScript to calculate the greatest common divisor and least common multiple of two or more numbers.
Use JavaScript's Math.hypot() to calculate the Euclidean distance between two points.
The Caesar cipher is a simple substitution cipher, which can be easily implemented with a few lines of JavaScript code.
Sort an array of numbers, using the heapsort algorithm.
Sort an array of numbers, using the selection sort algorithm.
Sort an array of numbers, using the quicksort algorithm.
Sort an array of numbers, using the bucket sort algorithm.
Sort an array of numbers, using the merge sort algorithm.
Sort an array of numbers, using the insertion sort algorithm.
Sort an array of numbers, using the bubble sort algorithm.