InterviewSolution
| 1. |
What are default parameters in ES6? |
|
Answer» Destructuring is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct VARIABLES. You can also HANDLE nested structure by using nested destructuring syntax. Object Destructuring Now we will refactor the above using “Object Destructuring”. Basically, you use an object literal on the left-hand-side of an assignment expression for object destructuring. Nested Object Destructuring Array Destructuring Array destructuring is similar to object destructuring, but here instead of keys you assign any variable. Skipping Items |
|