#javascript
Read more stories on Hashnode
Articles with this tag
Introduced in ES5, the only difference between Array.prototype.some() and Array.prototype.every() is the following: some() is used to check if at...
The sort method sorts the elements of an array according to the callback function. For example on an array of numbers: function ascendingOrder(arr) { ...
The reduce() method allows for more general forms of array processing, and it's possible to show that both filter and map can be derived as special...
The filter() method creates a new array with all elements that pass the test implemented by the provided function. The filter() method calls a...
The map() method creates a new array populated with the results of calling a provided function on every element in the calling array. Example: let...
Check For The presence of an Element With indexOf() Since arrays can be changed, or mutated, at any time, there's no guarantee about where a...