When
we want the script to be executed when a user triggers an event,
(i.e. by clickign a button) we write the script in the head.This
ensures the script loads before anyone uses it. Scripts that conatin
functions are written in the Head. You will learn more about how
Functions work in lesson 7.
When we want a script to execute while the page loads into the browser,
we put the script in the body. When you place a script in the body
section it generates the content of the page.