Skip to content

Instantly share code, notes, and snippets.

@jgwill
jgwill / destruct-mastery.181204.js
Last active December 4, 2018 19:24
@stcgoal Can we Destruct JavaScript object only using prop name?
var o = new Object();
o.name = "myname in object";
o.note = "a value we wont care about";
o.description = "my description";
var { description, name } = o; // Trying to destruct only with prop name to see if that can be done (It would be implied too :) )