Struggling to grasp the concept of the map function and puzzled by why my output is showing
[undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined]
, even though I've provided the correct this
value as per the documentation...
var numbers = [1,2,3,4,5,6,7,8];
var results = numbers.map(
function(foo){
console.log(foo * foo);
}, results
);
results();
Any insights would be greatly appreciated!