I would like to know how array methods are built-in (the source code), for example this prototype todos() is how i imagine the every() method works behind the scenes, i would like to find that documentation.
Array.prototype.todos = function(fn) {
for(let item of this) {
if(!fn(item)) {
return false
}
}
return true
}
const result = [1, 2, 3].todos(x => x < 10)
console.log(result)