Skip to content

Instantly share code, notes, and snippets.

@rogerwschmidt
Last active May 10, 2017 02:32
Show Gist options
  • Save rogerwschmidt/5756a0aff852afb78adb43c98ac99c88 to your computer and use it in GitHub Desktop.
Save rogerwschmidt/5756a0aff852afb78adb43c98ac99c88 to your computer and use it in GitHub Desktop.

More Practice with Functions

Objectives

Use function calls as values for expressions

Create a function named add that takes two parameters and returns the sum. 
Store the result (evaluation) of the function into a variable name total

Use function calls within other function calls

var total = add(subtract(10,9), subtract(11,4))

Define the functions add and subtract such that the value of total is 8.

Describe the differences between function expressions and function declarations.

Talk to your neighbor and describe what the differences between a function expression 
and a function declarations are.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment