<v ->So far in this tutorial,</v> we've repeatedly mentioned JavaScript functions. And in Lesson 5, you'll finally learn how to define functions of your own. The resulting ability gives us greater flexibility as programmers. It enables powerful techniques like forEach, which we'll cover in this lesson, and functional programming which is the subject of Lesson 6. We'll begin by discussing a couple of equivalent ways to define JavaScript functions, including the more recent fat arrow notation that can look really confusing if you haven't seen it before. As part of this, we'll learn how to sort JavaScript arrays numerically. Thereby fixing a blemish we encountered in Lesson 3. We'll begin our study of functions in the read-eval-print loop, that is the REPL. And then learn how to put our function definitions in a file for later use. We'll also cover how to use multiple functions in a row, technique known as method chaining. We'll use method chaining to make a first definition of a palindrome function to see if a string is the same forward and backward. We'll end with the discussion of the forEach method for iterating through arrays which often provides a more convenient way of processing array elements than the for loop introduced in Lesson 2.