30秒学会 JavaScript 片段 – any
Returns true if the provided predicate function returns true for at least one element in a collectio...
Returns true if the provided predicate function returns true for at least one element in a collectio...
Returns all indices in an IList that match the given predicate function, match. Use Enumerable.Range...
Chunks an array into smaller arrays of a specified size. Use Array.from() to create a new array, tha...
Returns the symmetric difference betweend two collections. Use IEnumerable.Except() to only return e...
Returns the first n elements in a collection. Use IEnumerable.Count() to check if the enumerable is ...
Returns the most frequent element in an array. Use Array.prototype.reduce() to map unique values to ...
Initializes a 2D array of the given width, height and value. Use Enumerable.Repeat() to repeat value...
Takes several functions as argument and returns a function that is the juxtaposition of those functi...
Omits the key-value pairs corresponding to the given keys from an object. Use Object.keys(obj), Arra...
Create a n-dimensional array with given value. Use recursion. Use Array.prototype.map() to generate ...