Javascript
Javascript
Get the intersection of arrays
This function returns an array that contains the common elements of two or more arrays. JavaScript: TypeScript:
Javascript
Find the index of the last matching item of an array
This function finds the index of the last occurrence of a specified value in an array. JavaScript: TypeScript:
Javascript
Find the index of the minimum item of an array
This function finds the index of the smallest number in an array. JavaScript: TypeScript:
Javascript
Find the length of the longest string in an array
This function finds the length of the longest string in an array. JavaScript: TypeScript:
Javascript
Create an array of numbers in the given range
This function generates an array of numbers within a specified range. JavaScript: TypeScript:
Javascript
Empty an array
This function empties an array, removing all its elements. JavaScript: TypeScript:
Javascript
Create an array of cumulative sum
This function generates an array of cumulative sums from the input array. JavaScript: TypeScript:
Javascript
Convert an array of strings to numbers
This function converts an array of strings into an array of numbers. JavaScript: TypeScript:
Javascript
Compare two arrays
This function checks if two arrays are identical (considering order). It converts the arrays to JSON strings for comparison. JavaScript:…
Javascript
Count the occurrences of array elements
This function counts the occurrences of all elements in an array. It uses the reduce() method to iterate over the…
Recent comments