Is there a way to run a function after another functions completes? For example:
doSomething(); doSomethingElse();
i only want doSomethingE
You may want to do this....
function doSomething(callback) { // code for do some thing // now fire off the callback if (typeof callback === 'function') { callback(); } } function doSomethingElse() { } doSomething(doSomethingElse);