This may be a simple question, but I was wondering if there's a way to wait for a function to finish successfully (or unsuccessfully) complete before moving on to the next line of code.
For instance, in psuedocode, I want to do something like:
yield createuser(parameters);
do stuff
However, when I'm using these functions, it'll go from createuser to 'do stuff' before createuser is finished. I chain functions within the callbacks right now, but I feel that's messy. Any suggestions?