All Articles
Javascript
Clone an array
This function clones an array, creating a new array with the same elements. JavaScript: TypeScript:
Javascript
Unzip an array of arrays
This function ‘unzips’ an array of tuples into multiple arrays, reversing the ‘zip’ operation. JavaScript: TypeScript:
Javascript
Find the difference of two sets
This function finds the difference of two sets, i.e., elements that are in the first set but not in the…
Javascript
Find the maximum item of a set
This function returns the maximum value from a set. JavaScript: TypeScript:
Javascript
Check if an array is empty
This function checks whether an array is empty. JavaScript: TypeScript:
Javascript
Remove an item from a set
This function removes an item from a set. JavaScript: TypeScript:
Javascript
Convert a set to an array
This function converts a set to an array. JavaScript: TypeScript:
Javascript
Find the intersection of two sets
This function finds the intersection of two sets, i.e., elements that are common to both sets. 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
Find the union of two sets
This function finds the union of two sets, i.e., elements that are in either of the two sets. JavaScript:…