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 = function(a, b, c) {
return function () {
// do something with a, b, and c
}
}
There is no difference.
They do and mean the same thing.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.