Skip to content

Instantly share code, notes, and snippets.

@napramirez
Created April 10, 2015 02:14
Show Gist options
  • Save napramirez/6bb4b7dd63de63855638 to your computer and use it in GitHub Desktop.
Save napramirez/6bb4b7dd63de63855638 to your computer and use it in GitHub Desktop.
var add_x_y = function(x, y, cb) {
var z = x + y;
if (cb && typeof(cb)=="function") cb(z);
return z;
}
add_x_y(2, 3, function(n) { console.log(n); })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment