Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

Two sets of parentheses after function call

function add(x){
  return function(y){
    return x + y;
  };
}

var addTwo = add(2);

addTwo(4) === 6; // true
add(3)(4) === 7; // true
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Two #sets #parentheses #function #call
ADD COMMENT
Topic
Name
3+9 =