Skip to content

Instantly share code, notes, and snippets.

View loveyunk's full-sized avatar
🌻
Grinding

yw loveyunk

🌻
Grinding
  • 克莱登
  • Beijing, China
View GitHub Profile
@loveyunk
loveyunk / nativeJavaScript.js
Created June 4, 2019 12:19 — 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