Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function forEach(list, callback) {
var index = -1;
var length = list.length >>> 0;
while (++index < length) {
callback(list[index], index, list);
}
}
function forEach(list:Array<any>, callback:(value:any,index:number,array:Array<any>) => void):void {
let index:number = -1;
let length:number = list.length >>> 0;
while(++index < length){
callback(list[index], index, list);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment