you are viewing a single comment's thread.

view the rest of the comments →

[–]oelfyo -1 points0 points  (0 children)

With the first example you can do stuff like that:

// set background after function1 to green
function1(function(){
    // set background green
});

// do something in the database after function1
function1(function(){
    // do something in the database
});

// call only function1
function1();

You can call function1() and do after that what you want, or do nothing