---
title: "Comment by ShishirB on \"ES6 features you need to know\" | Hashnode"
description: "Regarding the spread and rest operator, why does it have two names when it does the same thing in both cases? It does spread the values in both cases, right ?"
url: "https://hashnode.com/posts/es6-features-you-need-to-know/5f7f435daddab004867df53f/comment/5f7fc9f0b8638504a7c123d6"
---

[Discussion](https://hashnode.com/posts/es6-features-you-need-to-know/5f7f435daddab004867df53f)

Comment [ES6 features you need to know](https://hashnode.com/posts/es6-features-you-need-to-know/5f7f435daddab004867df53f)

[ShishirB](https://hashnode.com/@ShishirB)

[Oct 9, 2020](https://hashnode.com/posts/es6-features-you-need-to-know/5f7f435daddab004867df53f/comment/5f7fc9f0b8638504a7c123d6)

Regarding the spread and rest operator, why does it have two names when it does the same thing in both cases? It does spread the values in both cases, right ?

[Nikolai Kolesnikov](https://hashnode.com/@kolesnilkov)

[Oct 9, 2020](https://hashnode.com/posts/es6-features-you-need-to-know/5f7f435daddab004867df53f/comment/5f7fc9f0b8638504a7c123d6#reply-5f8045f46e4aaa12c8be82e7)

I guess it depends on point of view.

When you declare function it is "rest": function funcName(a, b, ...rest) { console.log(rest); }

When you call function (or fill array, object) and try to pass a few arguments it is "spread":

funcName(...spread); \[...spread\]; {...spread};
