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


That's a neat trick!

Incase you somehow end up with dozens of arguments and only want a few of them this is an option too:

fn=(...{1:foo, 5:bar})=>({foo,bar})

> fn(1,2,3,4,5,6,7,8)
< {foo: 2, bar: 6}
code of conduct - report abuse