4IT580: Docs
4IT580 WebGithub

4th Practical Class:
Spread and Rest Operators

JavaScript Spread Operator

Combine multiple objects or arrays together.

Spread is when ... is on the right side of = operator.

JavaScript Rest Operator

Get the remainder of object or array after getting specific elements.

Rest is when ... is on the left side of = operator.

React Spread

App1 and App2 are equvivalent:

Spread and Rest in React

Combination of JavaScript Rest and React Spread is often used.

Notes for example below: