Skip to content

Instantly share code, notes, and snippets.

Created Feb 27, 2018
What would you like to do?
Callback = function(fn, thisArg) {
const _self = thisArg || this;
for (let i = 0; i < _self.length; i++) {
fn.apply(thisArg, [_self[i], i, thisArg]);
// Mutation.
thisArg.values[i] = i;
let values = ['Hello', 'World'];, index, ctx) {
console.log(value, index);
}, this);
console.log(values, this.values);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment