how to write spread operator with objects code example
Example 1: spread operator javascript
const parts = ['shoulders', 'knees'];
const lyrics = ['head', ...parts, 'and', 'toes'];
// ["head", "shoulders", "knees", "and", "toes"]
Example 2: spread operator es6
[...fruits]