There are some conventions when it comes to using brackets in JavaScript, but do they actually get treated differently when the brackets are used to invoke.
Is fn ()
different to fn()
in any way, except to the human reader?
Further, is there a difference between (fn)()
and fn()
, and if yes which of these to would fn ()
resemble?
For this question fn
can be any function function fn() {}
or var fn = function () {}
EDIT : This question isn't "Will they have the same result?", it is about if/how JavaScript compilers treat them.