The Rest and Spread operator in javaScript

Ayesha Malik
Jan 22, 2021

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.

--

--

Ayesha Malik

I’m a full-time software engineer who loves sharing knowledge to help others become better developers.