.forEach iteration method is a kind of undefined return value?


#1


Hey! May I have your name? You helped me out a lot. But I don’t know how to call you.
I got confused as the this girl about .forEach iteration method is a kind of undefined return value.


It is also named as undefined in MDN.

Thank you so much for always answering my questions.


#2

#3

The forEach method has no return, and it also has no break. For this reason it should not be logged, as in,

console.log(array.forEach(function () {}));

#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.