Skip to content

Instantly share code, notes, and snippets.

@gojun077
Created September 11, 2012 13:40
Show Gist options
  • Save gojun077/3698550 to your computer and use it in GitHub Desktop.
Save gojun077/3698550 to your computer and use it in GitHub Desktop.
CodeAcademy - Review of Functions in JS Sec 2/3, Ex 1/4
/*
1. A Function with 2 Parameters
Functions can have zero, one or more parameters. You can
think of these as input that the function receives, and
then uses to do something.
The code example shows a trivial function multiply function
that takes two numbers as arguments and returns their product.
Do you remember how volume is defined? Complete the definition
of the volume function.
*/
var multiply = function (x, y) {
return x * y;
};
multiply(2, 5);
var volume = function (l, w, h) {
return l * w * h;
};
volume(2, 3, 4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment