I need to add the function n number of arguments. Example : add(3)(8)(6)(10).
if it is only 2 arguments we can add the code like this. add(4)(5)
function add(x){
return function(y){
return x+y;
}
}
add(4)(5)
if it is n number of arguments of how can we do this?