I have a question,please see the code snippet,i can see it's invoked in some js libraries.
Can anyone tell me what's the excuting order of this snippet? On my perspective, first ,the compiler declares a variable A. When come to excuting time,it defines a function and assigns it to variable A ,But in function body,the variable A can't reference anywhere since the 'var A' is still not been asigned to a funciton.
I hope that I've expressed my quesion clearly.
Tell me where I am wrong.
var A= function(){reutrn A;}
console.log(A()()().....) /*no mater how many '()'s,it still returns the "function (){return A }" */