Javascript
Javascript
Clone an array
This function clones an array, creating a new array with the same elements. JavaScript: TypeScript:
Javascript
Compare two sets
This function compares two sets for equality, regardless of the order of elements. JavaScript: TypeScript:
Javascript
Find the maximum item of a set
This function returns the maximum value from a set. JavaScript: TypeScript:
Javascript
Find the minimum item of a set
This function returns the minimum value from a set. JavaScript: TypeScript:
Javascript
Remove an item from a set
This function removes an item from a set. JavaScript: TypeScript:
Javascript
Create a set from an array
This function creates a set from an array. The set contains all unique elements of the array. JavaScript: TypeScript:
Javascript
Convert a set to an array
This function converts a set to an array. JavaScript: TypeScript:
Javascript
Split an array into chunks
This function splits an array into chunks of a specified size. JavaScript: TypeScript:
Javascript
Sort an array of items by given key
This function sorts an array of objects based on a given key. JavaScript: TypeScript:
Javascript
Swap the rows and columns of a matrix
This function swaps the rows and columns of a 2D array, also known as ‘transposing’ a matrix. JavaScript: TypeScript: