Skip to content

Instantly share code, notes, and snippets.

@tim-smart
Created September 1, 2010 04:39
Show Gist options
  • Select an option

  • Save tim-smart/560231 to your computer and use it in GitHub Desktop.

Select an option

Save tim-smart/560231 to your computer and use it in GitHub Desktop.

Revisions

  1. tim-smart created this gist Sep 1, 2010.
    16 changes: 16 additions & 0 deletions control_flow.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@

    db.get(stuff, function (error, results) {
    // Do some stuff

    db.get('bacon', getTheBacon);
    });

    var getTheBacon = function (error, results) {
    // Do stuff

    db.get('beer', drinkTheBeer);
    };

    var drinkTheBeer = function (error, results) {
    // Etc...
    };