Question: use JavaScript to answer the following: console.log(. Destructuring Bind and Spread Syntax // write a function that returns an array of three numbers // call
use JavaScript to answer the following:

console.log(". Destructuring Bind and Spread Syntax // write a function that returns an array of three numbers // call that function and use destructuring syntax to assign the numbers to three separate variables // write a function that returns an object // call that function and use destructuring syntax to assign the property values to separate variables // write a function that takes two named parameters using destructuring syntax // call that function by passing in an object // using Object.entries and a for...of loop that destructures the [key, value] pair, // print the second object like: // name: bob // age: 32 // favorite_color: mauve // using spread syntax, copy your object array and add a fourth object // using spread syntax, make a copy of the third object in the array but with the name changed to 'batbatbat' // write a function that uses spread syntax ("rest") to take a variable number of numbers and return the sum
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
