J
jor
i want the key of a hash to be based on a variable:
i tried:
var c = 'blah';
var arr = { 'a':1000, b:2000, c.valueOf():3000 };
also
var arr = { 'a':1000, b:2000, c.toString():3000 };
why not?
it seems none of this is allowed.
is there a way to do this?
i tried:
var c = 'blah';
var arr = { 'a':1000, b:2000, c.valueOf():3000 };
also
var arr = { 'a':1000, b:2000, c.toString():3000 };
why not?
it seems none of this is allowed.
is there a way to do this?