3. Functions
A function is a series of programming steps that
you set up at the beginning of your script
●
●
●
write code once
run code any time you like
run code as many times as you like
8. Parameters & Arguments
Parameters are variables used to accept
information into a function.
Arguments are values used to supply
information to a function.
11. Retrieving Info from Functions
To return a value from your own functions, use
the return keyword.
Notes:
● the return keyword should be the last
statement in a function
● a function can only return one value
12. Retrieving Info from Functions
Example:
function functionName(parameter1, parameter2) {
// the JavaScript you want to run
return value;
}
14. Lab
Create a quiz (at least five questions) testing
the user’s knowledge on the HTML, CSS and
JavaScript you’ve learned so far.
● make functional first
● make stylish last
● upload to server
● ask classmates to take the quiz
15. Lab
Build out pizza site:
● add date
● add sales tax function
Create index page for your server