Getting Started with Modern JavaScript — Spread vs Rest

Photo by tripleMdesignz on Unsplash

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…

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How I developed an application to convert images to pdf, join pdf files and compress several pdf’s…

compress with javascript

Javascript. Maps and Weak Maps

How to create simple REST API using Spring Boot

Reactive Programming Pt. 2 — Asynchronous Time!

Build a simple to-do app in React (Part 3)

Structuring TypeScript project in Express with phone number authentication using Twilio

Functional setState is the future of React

Welcome To React

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michael Karén

Michael Karén

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

More from Medium

JavaScript 101: Array methods

React VS Angular: Clash of the Frontend Giants

Explaining First Class Functions in Javascript

Angular Vs React JS