Q:

how do i create a JS object with 2 keys

I would like to store values for string translation. 
this works:
> var yourObject = {};
> 
> yourObject[yourKey] = "yourValue";
> 
> console.log(yourObject );

i would like to have 2 keys
yourObject[lang][key] = "yourValue";

A:

Just take the same approach for a single property and assign the object to another property.

var key = 'cat'
    lang = 'en',
    temp = {},
    object = {},

temp[key] = 'Cat';
object[lang] = temp;
console.log(object);

Or use a direct approach with an object literal.

var object = { en: { cat: "Cat" } };

console.log(object);

