Skip to content

Instantly share code, notes, and snippets.


Rakesh Nayak rakesh-nayak

  • India
View GitHub Profile
rakesh-nayak / nativeJavaScript.js
Created Aug 23, 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);