function each (arr,callback) {
for (let i = 0; i < arr.length; i++) {
callback(arr[i],i)
}
}
let narr = [10,20,290]
each(narr,(item,index) => {
console.log(item,index);
})
function each (arr,callback) {
for (let i = 0; i < arr.length; i++) {
callback(arr[i],i)
}
}
let narr = [10,20,290]
each(narr,(item,index) => {
console.log(item,index);
})