Js Spread Rest — Free Javascript Tutorial

Learn Js Spread Rest in Javascript with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

Js Spread Rest — Free Javascript Tutorial

Learn Js Spread Rest in Javascript with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

✓ 100% Free ✓ No Login Needed ✓ NCERT / CBSE Aligned ✓ Download as PDF

TL;DR: Learn Js Spread Rest in Javascript with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

Written & reviewed by the Syllab.in Academic Team (CBSE/NCERT subject experts) · Updated

🤖 Stuck on any question? Ask Syllab's free AI Tutor for a step-by-step explanation — instant, unlimited, no login.

Js Spread Rest in Javascript

Spread `...` expands an iterable (array/string) into individual elements. Used in: function calls, array literals, object literals.

Rest `...` collects remaining elements into an array. Used in: function parameters, destructuring.

Copy array: `const copy = [...original]`. Merge arrays: `const merged = [...arr1, ...arr2]`.

Copy object: `const copy = {...original}`. Override: `const updated = {...user, age: 20}`.

Learn Js Spread Rest step by step with Syllab's free interactive Javascript tutorial — runnable code examples, practice exercises and instant AI feedback, all free with no signup. Explore the full Javascript course →