Skip to content

Instantly share code, notes, and snippets.

@al-the-x
Created May 6, 2015 04:37
Show Gist options
  • Select an option

  • Save al-the-x/2f0c3f39d0e5677395d3 to your computer and use it in GitHub Desktop.

Select an option

Save al-the-x/2f0c3f39d0e5677395d3 to your computer and use it in GitHub Desktop.
Look, ma, it's a function...
// function definition
function addition(a, b /* paramters go here */){
// function body
return a + b;
}
// function invocation
addition(3, 5 /* arguments go here */); // yields 8
addition(2, 7); // yields 9
addition(3, 15); // yields 18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment