spread operator json 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 and rest operator javascript
function myData(...args){console.log(args) ; // ["Marina",24,"Front-End Developer"]}myData("Marina",24,"Front-End Developer") ;