Javascript: Functions
ATLS 3020 - Digital Media 2 Week 4 - Day 2
Javascript: Functions ATLS 3020 - Digital Media 2 Week 4 - Day 2 - - PowerPoint PPT Presentation
Javascript: Functions ATLS 3020 - Digital Media 2 Week 4 - Day 2 Quiz #1 next Monday Structure: Topics covered: 30 minutes in-class Input/Output Open note, book, Creating arrays, deleting and internet, etc adding elements
ATLS 3020 - Digital Media 2 Week 4 - Day 2
Your project plan should include the following: Due Feb 9 ○ description of your project ○ pseudocode for algorithms and program flow ○ visual design template or example ○ brief description of how you will test your project
Verse 1 Verse 1 Verse 1 Chorus Chorus Chorus Verse 1 Verse 1 Verse 1 Chorus
function do_something () { // inside the function } // outside the function do_something(); Javascript
There are TWO key words!
variable name) Calling a function Type the name of the function with parentheses afterwards.
function do_something (x, y) { // inside the function } // outside the function var a = 0; do_something(a, "red"); Javascript
Parameters
Calling a function
variables as parameters
Continue playing the card game War!
while loop and put it inside of the function.