Good reference to Javascript functions
Functions are used to sensibly organzie code. Then they are "Called" elsewhere.
Information can also be passed to functions (that's more advanced).
Example Functions code
function myGrabNumber(){
return parseInt(document.getElementById('myText01').value)
}