Getting Started with Modern JavaScript — Spread vs Rest

Michael Karén
3 min readSep 22, 2020

JavaScript version ES6 (ES2015) brought us a couple of useful features for arrays represented by three dots (…), the rest parameter, and the spread operator. And ES2018 introduced the same syntax for objects.

It can be confusing to have one syntax represent two different uses. In this article, we will try to clear up the confusion and look into the two ways of using…

--

--

Michael Karén

Frontend Architect • JavaScript Enthusiast • Educative.io Author • ngVikings organizer.