In order to create a function, we use the function keyword, a unique name and a pair of parentheses. Once created, we can reuse it whenever we feel like it.

Simple as that! Everything we put in the braces becomes a part of the function. But why doesn't it display anything?

Are you sure that this is the right time and place for the var keyword? We're trying to create a function.