Consider the following two examples:
First:
var x = (function(){ return 786; }());
Second:
var y = function(){ return 786; }();
I know that we can't use function(){ return 786; }(); directly as an anoomymus self calling function but now since I am assigining it to variable x I can use this function. So,
- Is there any difference in result of the behaviour of variable
xin First and Second method?