Why should I use a function if I could just use var (variable)? What is the main difference between the two. I find that variables and functions do the same thing.
A variable just holds one piece of data like a string or a number.
A function holds a set of directions that you can reuse with different information.