Is there a way to run a piece of JavaScript code only ONCE, without using boolean flag variables to remember whether it has already been ran or not?
Spe
(function (){ var run = (function (){ var func, blank = function () {}; func = function () { func = blank; // following code executes only once console.log('run once !'); }; return function(){ func.call(); }; })(); run(); run(); run(); run(); })();