I know one way is there any other way to make this type of function call and get the correct addition.
My answer:
function add(x) {
return function(y) {
return function(z) {
return x + y + z
}
}
}
add(4)(5)(6)
It means that the first function returns another function and then that returned function is called immediately then that function returns another function which is then called immediately which will give us the final answer.