[prev] 53 [next]

Functions

Functions have the form

return-type function-name(parameters) {

    declarations

    statements

    return …;
}

  • if return_type is void then the function does not return a value
  • if parameters is void then the function has no arguments