Skip to content

Glossary: JavaScript Beyond the Basics

Rest / spread

Also written: rest, spread, rest parameter, ..., spread syntax

Three dots mean rest when they collect leftover values into one variable (on the left of `=` or in a parameter list), and spread when they lay items out into a new array, object or call. With spread objects, later properties win.

Where the book teaches it

Related terms

DestructuringShallow copy