Chapter 5: Functions

Javascript MethodsCongratulations, you've made it through the two longest chapters in this course.

In those two chapters, we covered a lot of the fundamentals in Javascript programming. We also looked at some of the built-in methods that are available in Javascript, such as the prompt() method and the push() and pop() methods for arrays.

In this next chapter, we are going to look at functions.

A function is similar to a method except that it is not part of an object (we’ll cover objects in the next chapter). While there are some differences between functions and methods, some websites (such as the Mozilla website shown on the right) use the two terms interchangeably.

We won’t be too hung up on the differences between the two and may use the two terms interchangeably on this site too.