0

What is this correct name? I tried to google it, but I can't find answer what I want.

const example = {"house":"foo","owner":"bar"};
var {house} = example;

console.log(house);

What is {house} = example correct name?

Sorry about my describing, English is not my native language.

5026
  • 1
  • 3
  • 2
    This is called [Destructuring assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) – VLAZ Oct 20 '20 at 15:14
  • Also relevant: [What does curly brackets in the `var { … } = …` statements do?](https://stackoverflow.com/q/15290981) – VLAZ Oct 20 '20 at 15:15
  • thanks for your answer! – 5026 Oct 20 '20 at 15:20

0 Answers0