this should be pretty easy, but I can't seem to get the syntax right.
var newObject = {a:1,b:2,c:"three"};
var {...newObject} = newObject;
console.log(a); // returns undefined
I'm trying to automatically destructure my objects. I can get it to work if I use
var {a,b,c} = newObject
but I have some long arrays and want to not have to type out all my variables