harshilp24 / RestvsSpread

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blog Draft

In your coding journey, you may have come across the terms Rest and Spread and wondered what they are and how they differ. The JavaScript REST and Spread Operators are just two different ways to declaratively create arrays or array-like objects. When someone asks "What’s the difference?" They are asking which one is more appropriate for their particular situation.

In this article, we'll go over how they work, when to use them, and some common scenarios when they may be better for your code. We'll also take a look at how they work with promises in ES6. So, first, let's understand what a REST Parameter is.

Markdown File

About