Skip to content

Instantly share code, notes, and snippets.

@unixcult
Forked from juliangruber/head.html
Created July 27, 2013 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unixcult/6096073 to your computer and use it in GitHub Desktop.
Save unixcult/6096073 to your computer and use it in GitHub Desktop.
requirebin sketch
<style type='text/css'> html, body { margin: 0; padding: 0; border: 0; } </style>
function eat(food, digest){
var ateTheFood = food + " got eaten";
digest(ateTheFood);
}
//eat('pizza', function(poop){
// console.log(poop);
//});
//the line below more elegantly does the work of the lines above
eat('pizza', poop);
function poop(food) {
console.log(food);
}
function eat(o,n){var t=o+" got eaten";n(t)}function poop(o){console.log(o)}eat("pizza",poop);
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; }
body, html { height: 100%; width: 100%; }</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment