DEV Community

Discussion on: Point-free gotchas in JavaScript

Collapse
 
tclift profile image
Tom Clift

In your bind example, it might be worth mentioning a related gotcha: bind sends arguments as additional parameters. In your getMessage example, if getMessage took a number, and you bound from a function with an unrelated number param, you get a nasty surprise!

Collapse
 
danhomola profile image
Dan Homola

Thanks for the addition, I did not realise that!