Consider the following example:
In the example given above,
we are storing the value of person.name
in the variable name
.
The remaining properties are stored
in the contactInfo
variable,
using the rest operator - ...
,
i.e., three dots.
The rest operator must always
come last.
Otherwise it will cause an error.