1 - Javascript:Intro - Functions
Functions
A function contains some code that will be executed by an event or a call to
that function. A function is a set of statements. You can reuse functions within
the same script, or in other documents. You define functions at the beginning
of a file (in the head section), and call them later in the document.
So let's try a real one (from of www.w3schools.org)