ECMAScript 2015 (aka ES6 Harmony)
ES 2015 provides support for this through a feature called computed property names (although the relevant section of the spec is called “Object Initializer”).
Simply put, surround the variable (in general, any expression) with square brackets to evaluate it and use the result as a property name. In your example that would be
elements = { [art]: stk };
Original answer (targeting ES5)
You cannot create object literals like that. You need to write
elements = {};
elements[art] = stk;
The reason why elements = { art: stk } does not work is because it is equivalent to elements = { "art": stk } (with quotes). The two versions are equivalent in JavaScript as long as art is a legal identifier, and the second version makes it clear what’s going on.