DEV Community

Discussion on: Easy console.log() inside one liner functions

Collapse
 
mfurkankaya profile image
Furkan KAYA • Edited

I think your third example won't work because in the first mapping console.log will not return anything, so you will have an array of undefineds for second map function. I might be wrong but I think it's going to be like this.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Yep, you can easily test this in the dev tools with [1, 2, 3].map(console.log) and it retuns an array of undefined