A function is a set of expressions that are performed in sequence.
For example, the following function adds 3 numbers together and returns them:
function(){
return 1+2+3
}
Notice that when you highlight and print the function, you get the same text back. This is because you have not actually invoked the function. To invoke the function, you need to follow it with a set of parantheses, like this:
function(){
return 1+2+3
}()
If you highlight the function above and print, it will give you a result of 6.