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.
Finds the prime factors of a given number using the trial division algorithm.
JavaScript, Math · Dec 28, 2020
Generates an array of n
random integers in the specified range.
JavaScript, Math · Oct 22, 2020
Returns the symmetric difference between two arrays, without filtering out duplicate values.
JavaScript, Array · Oct 22, 2020
Converts the values of RGB components to a hexadecimal color code.
JavaScript, String · Nov 3, 2020
Calculates the standard deviation of an array of numbers.
JavaScript, Math · Oct 22, 2020
Calculates the weighted average of two or more numbers.
JavaScript, Math · Nov 3, 2020
Returns the unique symmetric difference between two arrays, not containing duplicate values from either array.
JavaScript, Array · Oct 22, 2020
Returns an array of elements that appear in both arrays.
JavaScript, Array · Oct 22, 2020
Calculates the least common multiple of two or more numbers.
JavaScript, Math · Dec 28, 2020
Calculates the percentage of numbers in the given array that are less or equal to the given value.
JavaScript, Math · Oct 22, 2020