Skip to content

Instantly share code, notes, and snippets.

@carcigenicate
Last active June 30, 2017 19:23
Show Gist options
  • Save carcigenicate/9d7e7474690b80e4fd37bf62bcea13ff to your computer and use it in GitHub Desktop.
Save carcigenicate/9d7e7474690b80e4fd37bf62bcea13ff to your computer and use it in GitHub Desktop.
// Create a function called "add"
function add(num1, num2) {
var result = num1 + num2
return result // <----- Returning from the function
}
var result = add(1, 2) // <----- Called the function. "result" holds a 3
var result2 = add(3, 4) // <----- Called the function again. "result2" holds a 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment