What do the brackets associated with the function name mean?

I look at another user's code and try to understand it. They have a function call name surrounded in parentheses:

myButton.onclick = (myFunction)(a, b, c); 

Isn't it like that:

 myButton.onclick = myFunction(a, b, c); 

edit:

To add more context, the myFunction function looks like this:

 myFunction = function(a, b, c) { return function () { // do something with a, b, and c } } 
+6
source share
1 answer

There is no difference.

They do and mean the same thing.

+3
source

Source: https://habr.com/ru/post/950108/


All Articles