Antwort auf: Vampiric Desire
Antwort auf: djchrisnet
oder man benutzt einfach eine Konstante



Code:
const abc = { a: 1, b:2 } >>>> Object {a: 1, b: 2}
abc.a = 3 >>> Object {a: 3, b: 2}
abc.d = 1 >>> Object {a: 3, b: 2, d: 1}



Scheint nicht für Objekte zu funktionieren :-D


Nun ja, dein Beispiel ist nicht ganz korrekt.

Code:
const abc = { a: 1, b:2 } >>>> Object {a: 1, b: 2}
abc = 'Foo'; >>>> code breaks