The following code including an IIFE causes an error in Node(node: v8.6.0) environment.
function A(){}
A()
(function(){})()
A(...) is not a function
This error information is confusing for me.
If I change the position of IIFE, the code runs successfully in Node.
(function(){})()
function A(){}
A()
I have searched the answer on google but didn't find why.