Destructuring assignment is the best one that came with latest JS features.
We can make our code look smart. Just take a look at the following:
1 | const Person = { |
Isn’t this lovely! \O/
We can do the same for arrays as well.
1 | const [max, min] = [80, 20]; |
Tip: We can swap values using the same. [a, b] = [b, a]