I am currently reading a book about AngularJS and I have a question regarding a javascript syntax that I don't understand.
var element = $compile('<button></button>')($rootScope);
How come the one can invoke a function with a two parenthesis pairs?
('<button></button>')($rootScope)
Can anyone please advise about this js construct?