DEV Community

Discussion on: TIL: A Basic Thing about map()

 
lexlohr profile image
Alex Lohr

This is less about .map than about console.log. If you want to know what argument a callback receives, you can just drop in console.log and will instantly see them. A neat trick for introspection.

Thread Thread
 
lisadean profile image
Lisa Dean

Definitely, I thought it was an elegant shortcut to having to do a map then console.log for example purposes.