Skip to content

Instantly share code, notes, and snippets.

View onso89's full-sized avatar
🎯
Focusing

Alonso onso89

🎯
Focusing
View GitHub Profile
@alexhawkins
alexhawkins / nativeJavaScript.js
Last active February 2, 2024 16:57
Implementation of Native JavaScript Methods (forEach, Map, Filter, Reduce, Every, Some)
'use strict';
/*****************NATIVE forEACH*********************/
Array.prototype.myEach = function(callback) {
for (var i = 0; i < this.length; i++)
callback(this[i], i, this);
};
//tests