double function call javascript

JavaScript
//It means that the first function ($filter) returns another 
//function and then that returned function is called immediately. 
//For Example:
function add(x){
  return function(y){
    return x + y;
  };
}

var addTwo = add(2);

addTwo(4) === 6; // true
add(3)(4) === 7; // true
Source

Also in JavaScript: