3 ms·
Because the first is a function returning function, and you have to think how that works, and the second one is just a simple function that returns a sum. Also
by codedokode 4y ago
Because the first is a function returning function, and you have to think how that works, and the second one is just a simple function that returns a sum.
Also, if you start a function with a word 'const' then it is less obvious that this is a function and not just a constant. In contrast, if you use a word 'function', then you understand what it is from the first word.
- xigoi 4y agoThat's only because you're not used to currying. A function is “just” a constant.