Skip to content

Instantly share code, notes, and snippets.

@joepie91
Created July 2, 2012 18:32
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 joepie91/3034779 to your computer and use it in GitHub Desktop.
Save joepie91/3034779 to your computer and use it in GitHub Desktop.
function addThree(x)
{
return x + 3;
}
// Method one.
original = 4;
y = addThree(original); // 4 + 3 = 7
z = addThree(y); // 7 + 3 = 10
// Method two.
original = 4;
z = addThree(addThree(original)); // 4 + 3 + 3 = 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment