How to return value from forEach array instance?
const numArr = [10, 20, 30, 40, 50];
numArr.forEach(function (num, index, array) {
console.log(array[index] + 100);
});
I was trying to return console.log value but it was returning last value sum.