1

I was reading some JavaScript code and saw a line of code similar to this.

const {name, password, email} = user;

I tried searching around but could not figure out what this syntax is called so I am not able find the documentation. Is this a new JavaScript syntax? What is it called? What does it do exactly?

daniekpo
  • 129
  • 3
  • 9
  • 5
    Object destructuring: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment – OliverRadini Sep 19 '18 at 15:13

0 Answers0