简体   繁体   English

参数是否传递给功能参数?

[英]Is parameters passed to the function parameters?

f2=function(fn){
    return fn
};

f1 = f2(function(a,b){
    console.log('' + a+ b)
    });

f1(3,4);

output is 34 输出是34

Why are the parameters(3 and 4) passed to f3? 为什么将参数(3和4)传递给f3?

Why are the parameters(3 and 4) passed to f3? 为什么将参数(3和4)传递给f3?

The function returned from f1 f1返回的函数

f2(function(a,b){
    console.log('' + a+ b)
});

is invoked () with 3 , 4 passed as parameters f1(3,4); 被调用()34作为参数传递f1(3,4); , where a is 3 , b is 4 ,其中a3b4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM