function_forEach(callback, thisArg) { let index = 0 while (this.length > index) { let element = this[index] callback.call(thisArg, element, index, this) index++ } }
function_map(callback, thisArg) { let index = 0 let array = [] while (this.length > index) { let element = this[index] let item = callback.call(thisArg, element, index, this) array.push(item) index++ } return array }