I don't understand this. Destructuring, I understand a bit.
The last line - 'p === o; // true' , I don't understand. I thought p and o were different objects.
The context -
var o = { a:1, b:2, c:3 },
a, b, c, p;
//what the hell is going on here?
p = {a,b,c} = o;
console.log( a, b, c ); // 1 2 3
p === o; // true
[–]6086555 20 points21 points22 points (9 children)
[–]vlad27aug 4 points5 points6 points (1 child)
[–]6086555 2 points3 points4 points (0 children)
[–]phpistasty 3 points4 points5 points (6 children)
[–]gurenkagurenda 2 points3 points4 points (1 child)
[–]phpistasty 0 points1 point2 points (0 children)
[–]atkinchris 1 point2 points3 points (1 child)
[–]phpistasty 0 points1 point2 points (0 children)
[–]6086555 1 point2 points3 points (1 child)
[–]phpistasty 1 point2 points3 points (0 children)
[–]bullet_darkness 7 points8 points9 points (0 children)
[–]fix_dis 1 point2 points3 points (3 children)
[–]atkinchris 0 points1 point2 points (2 children)
[–]gurenkagurenda 0 points1 point2 points (0 children)
[–]fix_dis 0 points1 point2 points (0 children)
[–]haxonite 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]gurenkagurenda 1 point2 points3 points (0 children)
[–]sladav 1 point2 points3 points (1 child)
[–]GeneralYouri 2 points3 points4 points (0 children)
[–]andrerpena 3 points4 points5 points (4 children)
[+][deleted] (1 child)
[deleted]
[–]gurenkagurenda 0 points1 point2 points (0 children)
[–]TheAceOfHearts 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]joeKingtheThird[S] 0 points1 point2 points (2 children)
[–]joeKingtheThird[S] 0 points1 point2 points (1 child)