re: Rename Variable While Destructuring In Javascript VIEW POST

TOP OF THREAD FULL DISCUSSION
re: There is a way to pick out sub-properties using desructuring, but I think it's awful for readability.. const me = { name:'David', family: ...
 

Ah, this is cool though!

If you want, you can do all three at once -- though I agree with your point that for readability, there aren't any gains here.

const { 
  name,
  family: { wife: {name: wife} } , 
  family : { animal : {name: dog } } 
  } = me;
code of conduct - report abuse