Why log the console in return of getter, return that console plus undefined?

hi there.
in a getter i create, i wrote for return :
return console.log(array);

the code then log the array in the console , but after that, log the undefined.
can you help my that i miss?

.log() method “returns” undefined (doesn’t have a return value would be a more accurate description).

then you return the undefined of the .log() method


thank you so much :+1:

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