function1(someVariable, function() { function2(someOtherVariable); }); } function function1(param, callback) { ...do stuff callback(); }