JavaScript Rest Operator
What good is it?
3 min readMay 24, 2021
The rest operator was released with JavaScript version ES6 which was released in 2015 and used in most modern browsers.
The main use of the rest operator is in function arguments. Let’s look at the this example:
“use strict” // Always usefunction sum( a, b ) {
return a + b;
}