The Rest and Spread operator in javaScript

Both rest and spread operators have similar syntax i.e 3 dots (…)

The spread operator is used to create copies of array/objects.

The rest operator is used to collect all the remaining values.