DEV Community

Discussion on: Closures in JavaScript

Collapse
 
bias profile image
Tobias Nickel

the last example.is currying, I thing today peoplebwould write that more as

const addition = (num1) => (num3) => (num3) => num1 + num2 + num3;

I think the ramdalib and reduz take heavy use of this sytax.

I am glad that closures don't play such a big role today anymore, now that we have asyc/await.