re: Here's a super-quick JavaScript trick for omitting argument names. VIEW POST

re: The use case is probably in something more FP-related, such as in the .map example I gave in my article. In those cases you don't choose the argume...

Oh, that's very true. In the map callback you may be interested only in the index, not the actual value, so you would use that trick in that instance. Got it, thanks!

My pleasure!

One thing to note is that I don't think I'll be using this in every situation... it's definitely a tradeoff in familiarity for "conciseness", but then again, so is using !0 instead of true. However, it is something that quite neatly uses quite a few recently introduced JavaScript features / sugars, so I thought it would be pretty cool to talk about. :)

code of conduct - report abuse