@One-Eyepatch

The destructuring assignment [a, b] = [b, a] swaps their values:
a becomes 10
b becomes 5

@tarunfitness101

When we do [a,b] is equal to [b,a] then the both array values are swapped then our output will be 10,5

@ebymanickam

Swaps the values
a gets b values, b gets a value
10,5

@anonymous.1151

Please do explain the logic also in the end. It will improve the thinking ability and will be easy to solve other problems as well.😊

@Chauhan_Sona

Output will be  : 10  5

@bcawallahvlogs7547

Destructuring a b = b a

@CoverPeople

D: ReferenceError: Cannot access 'b' before initialization

@scammer96

Let me run

@vsp53

10 ,5😂😂😂😂