Skip to content

Instantly share code, notes, and snippets.

@Tan-Moy
Last active April 8, 2017 10:00
Show Gist options
  • Save Tan-Moy/98c20da20b632227a3d9432c8ceee03e to your computer and use it in GitHub Desktop.
Save Tan-Moy/98c20da20b632227a3d9432c8ceee03e to your computer and use it in GitHub Desktop.
function sum (number1, number2){ //We defined a function with a name of sum and it takes 2 parameters
console.log (number1+number2); //Then it adds up the parameters and console.logs it
}
sum(2,1); //We invoke the function here and it prints out 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment