Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Rohit Luthra RohitLuthra19

🎯
Focusing
View GitHub Profile
@RohitLuthra19
RohitLuthra19 / nativeJavaScript.js
Created Oct 5, 2018 — forked from alexhawkins/nativeJavaScript.js
Implementation of Native JavaScript Methods (forEach, Map, Filter, Reduce, Every, Some)
View nativeJavaScript.js
'use strict';
/*****************NATIVE forEACH*********************/
Array.prototype.myEach = function(callback) {
for (var i = 0; i < this.length; i++)
callback(this[i], i, this);
};
//tests