LOLWesta, a social media forum

You are not connected. Please login or register

View previous topic View next topic Go down Message [Page 1 of 1]

[#2] Auto-Execute Function Empty [#2] Auto-Execute Function on Thu Apr 09, 2015 8:01 am


Tired of running wrapper function manually? Interested to run it automatically? You're in the right place.

In JavaScript, you can simply run some function manually with this :

function selfDestruct() {
 alert('Self Destruct');


Which is really annoying, for me.. and maybe for you. So, let's get rid of it.

Anonymous Function

So, we would need to use Anonymous Function in this time. It would run immediately because of the Anonymous Function.

Let's wrap this, why don't you:

(function() {
 alert('Self Destruct');

It must self-destruct itself. Or if you want it to be named..

(function foo() {
 alert('Self Destruct example');

It should work.

View user profile

View previous topic View next topic Back to top Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum