Can one set multiple properties inside an object literal to the same value?
An update to this (in terms of the latest JavaScript abilities) avoiding unwanted defined vars: { let v; var obj = { “a”: (v = ‘some value’), “b”: v, “c”: v }; } This will mean v won’t be defined outside the block, but obj will be. Original answer Another way of doing the same … Read more