I want to set two properties equal to each other in one object. Here's an example:
var obj = { // I want to do something like this
a: function() { ... },
b: alert,
c: a
};
Obviously that doesn't work and I have to do something like this:
var obj = {
a: function() { ... },
b: alert,
};
obj.c = obj.a;
Is there any way to do that in the declaration?