I just found out that it's possible to create an object and set the key dynamically in the curly braces without needing a second line.
var a = "dynamicKey";
var obj = {[a]: "value"}
vs
var a = "dynamicKey";
var obj = {};
obj[a] = "value";
Is this something that was always possible or is in some spec (ES3, ES5)?