destructuring assignment

  The destructuring assignment syntax is a JavaScript expression that makes it possible to extract data from arrays or objects into distinct variables.

  destructuring assignment

  A variable can be assigned a default, in the case that the value pulled from the array is undefined.

  destructuring assignment

  You can ignore return values that you're not interested in:

  destructuring assignment

  When destructuring an array, you can assign the remaining part of it to a variable using the rest pattern:

  destructuring assignment

  destructuring assignment

  Object destructuring

  destructuring assignment

  A variable can be assigned its value with destructuring separate from its declaration.

  destructuring assignment

  Assigning to new variable names

  destructuring assignment

  default values

  destructuring assignment

  Nested object and array destructuring

  destructuring assignment

  For of iteration and destructuring

  destructuring assignment

参考:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment

相关文章: