#Javascript #Tutorial #Hindi

Link for Complete JavaScript Tutorial in Hindi for Beginners: https://www.youtube.com/playlist?list=PLjpp5kBQLNTSvHo6Rp4Ky0X8x_MabmKye

Link for Complete HTML and CSS Tutorial in Hindi for Beginners: https://www.youtube.com/playlist?list=PLjpp5kBQLNTSdLVVjU_kea8J8lP24ZseT


In this video i will talk about Object destructuring in ES6 (JavaScript).


Destructuring in JavaScript is a simplified method of extracting multiple properties from an Object by taking the structure and deconstructing it down into its own constituent parts through assignments by using a syntax that looks similar to Object literals.

It creates a pattern that describes the kind of value you are expecting and makes the assignment. Object destructuring uses position.

Destructuring assignment is a special syntax that allows us to “unpack” Objects or objects into a bunch of variables, as sometimes that’s more convenient.

Destructuring also works great with complex functions that have a lot of parameters, default values, and so on. Soon we’ll see that.

Prior to ES6, when you want to assign properties of the person object to variables, you typically do it like this:

let firstName = person.firstName;
let lastName = person.lastName;

ES6 introduces the object destructuring syntax that provides an alternative way to assign properties of an object to variables:

let { firstName: fname, lastName: lname } = person;


Please subscribe to watch more videos like this: https://www.youtube.com/channel/UCWCGvAu1NDCldmLasELk62g?sub_confirmation=1



Join this channel to support Tech Gun:
https://www.youtube.com/channel/UCWCGvAu1NDCldmLasELk62g/join