---
title: "Discussion on \"Same Three Dots, Opposite Jobs: Spread vs Rest in JavaScript\" | Hashnode"
description: "Discussion on \"Same Three Dots, Opposite Jobs: Spread vs Rest in JavaScript\". How the spread operator expands values and the rest operator collects them, with arrays, objects, practical patterns and the traps to avoid"
url: "https://hashnode.com/posts/same-three-dots-opposite-jobs-spread-vs-rest-in-javascript/6b0499af1e05a43453a0c73e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Same Three Dots, Opposite Jobs: Spread vs Rest in JavaScript](https://jaydeepkanzariya.hashnode.dev/same-three-dots-opposite-jobs-spread-vs-rest-in-javascript?utm_source=hashnode&utm_medium=feed)

How the spread operator expands values and the rest operator collects them, with arrays, objects, practical patterns and the traps to avoid

1d ago · 8 min read · jaydeepkanzariya.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)
-   [#frontend](https://hashnode.com/tag/frontend)

## Written by

[Jaydeep Kanzariya](https://hashnode.com/@jaydeepkanzariya)

@jaydeepkanzariya · India

  
[View profile](https://hashnode.com/@jaydeepkanzariya)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
