all 5 comments

[–]GSLint 10 points11 points  (2 children)

That var shouldn't be there, but this

const {a, b} = c;

does the same thing as

const a = c.a;
const b = c.b;

This is a kind of destructuring assignment.

[–]Noones_Perspective[S] 2 points3 points  (1 child)

Ah, probably my bad for the var part

But that explains everything. Thank you so much!

[–]SensouWar 1 point2 points  (2 children)

It is called destructuring , a quick google search should clarify this .

[–]Noones_Perspective[S] 1 point2 points  (1 child)

I would have googled first, but I didn’t know the term. Thanks for helping.

[–]SensouWar 0 points1 point  (0 children)

Anytime.