JavaScript Rest Parameters

Posted by Joe Enos on March 20, 2021 · 1 min read

Rest parameters in JavaScript give you the ability to accept an array as a parameter in a function, but call it using an arbitrary number of arguments. This is kind of the reverse of the spread operator.

View code on GitHub