Question : calling anonymous function while declaring it
Answered by : parotay
var step = (function(){ // this code is executed immediately, // the return value is assigned to `step`
})();
Source : https://stackoverflow.com/questions/8583548/calling-a-javascript-anonymous-function-right-when-its-declared-doesnt-work | Last Update : Wed, 12 May 21