How to write JavaScript some and every method from scratch
some
Returns true if at least the callback function returns true otherwise false.
Array.prototype._some = function(cbFunction) {
for(let i = 0; i < this.length; i++) {
if(cbFunction(this[i], i, this)) {
return true
}
...
blog.devbitbyte.com1 min read