Skip to content

Instantly share code, notes, and snippets.

@thomasfr
Last active August 29, 2015 14:15
Show Gist options
  • Save thomasfr/414b98224059d06d8db0 to your computer and use it in GitHub Desktop.
Save thomasfr/414b98224059d06d8db0 to your computer and use it in GitHub Desktop.

Revisions

  1. Thomas Fritz revised this gist Feb 12, 2015. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion test.js
    Original file line number Diff line number Diff line change
    @@ -5,4 +5,12 @@ var foo = function(text, callback) {
    }
    callback("why don't you say hello?");
    console.log("nobody likes me :(");
    }
    }

    foo("hello", function(result) {
    console.log(result)
    });

    foo("asdasdasd", function(result) {
    console.log(result)
    });
  2. Thomas Fritz created this gist Feb 12, 2015.
    8 changes: 8 additions & 0 deletions test.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    var foo = function(text, callback) {
    if(text == "hello") {
    callback("hello world");
    console.log("Someone said hello");
    }
    callback("why don't you say hello?");
    console.log("nobody likes me :(");
    }