0

I can't seem to find anything in the documentation to understand why the { and } characters are wrapped around variables on some examples I've seen. Can anyone example why we would do that?

For example:

const {app} = require('./app/app.js');
Stephen King
  • 575
  • 5
  • 17
  • 28
Pete Haas
  • 1,781
  • 1
  • 12
  • 15
  • [MDN - Destructuizing Assignments](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) – Sunny Patel Apr 20 '18 at 14:45
  • I suggest to read about *destructuring assignment* in ES6: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment – Leonhardt Wille Apr 20 '18 at 14:45
  • Destructuring assignments! Now I know. Thank you. – Pete Haas Apr 20 '18 at 15:00

0 Answers0