2.3.1 Rest

Rest allows a function to store multiple objects in a single array. Here is an example…

When run, the console would output ‘gorilla’, ‘koala’, ‘elephant’ to the console.

Not: that rest parameters must be the last parameter in the function. This is why it is called “rest”…it is the rest of the parameters.