Created
May 6, 2015 04:37
-
-
Save al-the-x/2f0c3f39d0e5677395d3 to your computer and use it in GitHub Desktop.
Look, ma, it's a function...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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