JavaScript: Functions Flashcards

1
Q

JavaScript: Function

A

A function is just a series of statements that are grouped together into a special pacakage in JavaScript.

Function Basics

  • Defined with the function keyword
  • Functions have to be declared
  • Function name optional
  • Function Parameters are optional
    • You can have 0 or as many parameters as you want, and these will become variables that are local to and only available inside your function.
  • Funciton Statements go inside the curly braces and are instructions for the function to do something they are seperated by semicolons.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly