Hi,
my name is Madina and I'm trying to transition into junior developer role.
I started my journey long time ago. I paused, took breaks, questioned my life choices and current state is that I'm doing an online bootcamp (65% done) β
I did all the courses on JS, which you can only imagine, any format: YouTube tutorials, blogs, courses paid & free...
It took me 3 years to grasp on the concept of Destructuring in JS. I just couldnβt get it. Now I can tell that I finally understood it)
Given an object
let person = {
"userId": 1,
"id": 1,
"title": "delectus aut autem",
"completed": false
}
I donβt want the whole object, just some parts of it:
const { userId, title } = person;
So, Destructuring is a way of cutting pieces of a cake π π°
let cake = { π }
Results in
let { π° } = π
I hope it could help someone out there!
Top comments (0)