📜  双重函数调用javascript代码示例

📅  最后修改于: 2022-03-11 15:01:43.757000             🧑  作者: Mango

代码示例1
//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