Destructing in JS

why is there even a need for destructing in js. i mean by doing this arent you making your code complicated.

please keep explainations simple , im new to coding

const person = {
    name: 'Sue', 
    age: 45, 
    isActive: true

// without destructuring
const name =;
const age = person.age;
const isActive = person.isActive;

// with destructuring
const { name, age, isActive } = person;

When we want to take properties off an object and assign them to a local variable, destructuring is much shorter and more convenient. This is a common scenario. For example, we may prefer to pass an object into a function to avoid a long list of parameters. But inside the function, we may prefer to work with simple variables. This type of code is also very common when handling the results of a data request.

Code which is shorter is generally (though not always) better and easier to read. However, if you are a beginner, you might prefer to use the long method - at least until you get confident about using dot notation.