Making It Functional
In this chapter, we use functions to create a game called Function Junction.
Functions are programs inside of programs. Functions are great at handling tasks that may be required multiple times by different parts of a program. They’re also a great way to keep things organized within your program.
When a function is part of an object (such as the document object, for example) we call it a method. But it’s still a function.
Can you think of other functions you’ve seen?