SyntaxFix
Write A Post
Hire A Developer
Questions
To add another esoteric way, this works aswell:
var obj = {a: 1, b:2, c:3} var newobj = {a,c}=obj && {a,c} // {a: 1, c:3}
but you have to write the prop names twice.