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.
Replaces all but the last num
of characters with the specified mask character.
JavaScript, String · Oct 21, 2020
Serializes a cookie name-value pair into a Set-Cookie header string.
JavaScript, Browser · Oct 22, 2020
JavaScript distinguishes expressions and statements. Learn their differences in this short article.
JavaScript, Type · Nov 7, 2021
While both the prefix and postfix operators increment a value, the resulting value of the expression is very different.
JavaScript, Math · Oct 31, 2021
When it comes to immutability, many developers have trouble wrapping their head around JavaScript strings. Yet they're not as complicated as you might expect.
JavaScript, String · Oct 10, 2021
Did you know there's a JavaScript value that's not equal to itself?
JavaScript, Type · Dec 12, 2021
Ever needed to convert a decimal number to hexadecimal? Here's a quick and easy way to do it.
JavaScript, Math · Sep 21, 2022
Decodes a string of data which has been encoded using base-64 encoding.
JavaScript, Node · Sep 15, 2020
Calculates the number of ways to choose k
items from n
items without repetition and without order.
JavaScript, Math · Dec 28, 2020
Calls the argument if it's a function, otherwise returns it.
JavaScript, Function · Apr 4, 2022
Creates a function that will invoke a predicate function for the specified property on a given object.
JavaScript, Function · Nov 1, 2020