Is there any way to assign an object property like pear below? (example doesn't work)
var fruitColors = { apple: "green", pear: fruitColors.apple};
I can achieve it by doing this however, but I'd like to do it like above if it's possible.
var fruitColors = { apple: "green" };
fruitColors.pear = fruitColors.apple;