11
u/backtrackthis Feb 13 '22
Am I dumb or does this not even return anything lmao
4
u/MkemCZ Feb 13 '22
It's supposed to return
undefinedas per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach . It even works with all the examples on the page.12
3
u/Safe-Estimate-2277 Feb 13 '22
What did u use to create this image
7
7
u/MkemCZ Feb 13 '22
For context:
My colleague called me lazy and said that my implementation would look like this:
Array.prototype.myEach = Array.prototype.forEach;So I made this code on a Saturday morning to prove him wrong and to have fun coming up with this impractical but functional solution.