What is a function?

Functions allow you to write reusable code. A function is defined by the following syntax: "function <function_name>(import parameters separated by comma){ }"

For example:

function calc_average(a, b) {

return( (a + b)/2)

}