To declare an object where one of the keys is variable, you can do the following:
var obj={};
obj[variable]="foo";
Is they a more concise syntax ?
To declare an object where one of the keys is variable, you can do the following:
var obj={};
obj[variable]="foo";
Is they a more concise syntax ?