JavaScript Rest Operator

What good is it?

Rich Brown

--

Photo by Mika Baumeister on Unsplash

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;
}

--

--

Rich Brown

AI-driven developer with extensive web app experience. Passionate about leveraging AI to innovate & achieve business success. Skilled in UI/UX design and dev.