Skip to content

Instantly share code, notes, and snippets.

View rakesh-nayak's full-sized avatar
👋

Rakesh Nayak rakesh-nayak

👋
  • India
View GitHub Profile
@rakesh-nayak
rakesh-nayak / nativeJavaScript.js
Created August 23, 2018 01:57 — 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