Intuit Interview Question
Java DevelopersTeam: book
Country: India
Interview Type: Written Test
This concept is called currying, which is used in function programming languages.
So If you declare the values like
function a(a) {
return function(b) {
return function(c) {
return a + b + c;
}
}
}
As per the concept, It corresponding to each argument it returns a function.
E.g. var first = a(4); // a function
var second = first(5); // a function
var final = second(6); // or first(5)(6), which is the final value.
Do you mean something like this?
- privacy.addict August 01, 2016