Skip to content

Instantly share code, notes, and snippets.

View RohitLuthra19's full-sized avatar
🎯
Focusing

Rohit Luthra RohitLuthra19

🎯
Focusing
View GitHub Profile
@RohitLuthra19
RohitLuthra19 / nativeJavaScript.js
Created October 5, 2018 12:16 — forked from alexhawkins/nativeJavaScript.js
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