Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Faheem-Khan97/javascript-coding-problems-with-theory
/ sum
Function
sum
currying.js:29–37 ·
view source on GitHub ↗
(a)
Source
from the content-addressed store, hash-verified
27
*/
28
29
function
sum(a){
30
return
function
curried(b){
31
if
(!b){
32
return
a;
33
}
34
return
sum(a+b)
35
36
}
37
}
38
39
console.log(sum(1)(2)(3)(4)());
// 10
40
Callers
2
currying.js
File · 0.70
curry
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected