Is there a way in Javascript to wait for the completion of another function and it's callback and essentially "pause" the completion of the current function until that time?
Example:
var doSomething = function(callback) {
  doSomethingElseAsynchronously(doSomething);
  /* Wait until doSomethingElseAsynchronously */
  /* is finished and it's callback has completed */
  return callback();
};
 
    