The three dots are called the rest parameter syntax. A rest parameter allows us to represent an indefinite number of arguments as an array. Why does this matter? Well, let’s take a look at a simple…