Declaring Functions

Declaring a Function

inline

  • Use the function keyword to declare a function

  • Functions can be given a name

  • The name must be followed by parentheses

  • The opening and closing curly braces indicate a “code block”

  • The statements for your function goes within the code block

  • Simply declaring the function will not run this code, this function must be “called” in order for the code inside the function to be run