...

/

Solution Review: Rest & Spread Syntax

Solution Review: Rest & Spread Syntax

In this lesson, we will discuss the solutions to the questions in the previous lesson.

Solution 1 #

Explanation #

Rest follows the same syntax as the spread syntax, i.e., placing three dots ... before what we choose to copy. However, the difference lies in the purpose. Where spread is used to create copies of arrays/objects, rest is used to collect all the remaining values into an ...

Access this course and 1400+ top-rated courses and projects.