[Solved] .forEach() Javascript function is returning an Array?
[ad_1] It doesn’t return anything. You can check that by logging the result of the forEach call: var arr = [1, 3, 2]; var arr_temp = []; console.log(arr.forEach(function (i) { return arr_temp.push(i + i); })); // undefined console.log(arr_temp); // 2, 6, 4 3 [ad_2] solved .forEach() Javascript function is returning an Array?