[英]What do brackets surrounding function name mean?
I am looking at someone else's code and trying to understand it. 我在看别人的代码并试图理解它。 They have a function call name surrounded in parenthesis:
它们在括号中包含一个函数调用名称:
myButton.onclick = (myFunction)(a, b, c);
Is this different than: 这有什么不同于:
myButton.onclick = myFunction(a, b, c);
edit: 编辑:
Just to add more context, the function myFunction has the following form: 只是为了添加更多上下文,函数myFunction具有以下形式:
myFunction = function(a, b, c) {
return function () {
// do something with a, b, and c
}
}
There is no difference. 没有区别。
They do and mean the same thing. 他们这样做并且意味着同样的事情。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.