Just tried to do something like this and it wont work, wondering if there is anyway?
var obj = {
intiger:5,
conditional:(something) ? "something" : "nothing",
string:"nothing important"
};
This is breaking because of the presence of the : within the conditional. Anyway to do this without it breaking and keeping this format of obj.
I know that I can do.
obj.conditional = (something) ? "something" : "nothing";