17.
Implement an infinitely curried addition function
MediumExample: console.log(add(1)(2)(3)(4)) — Implement this both with and without extra empty parentheses at the end.
Example: console.log(add(1)(2)(3)(4)) — Implement this both with and without extra empty parentheses at the end.