I have been using square bracket notation in Javascript to create and call associative arrays.
In this example, I understand that square bracket notation allows you to use a variable to call a certain object in the array.
How would you do something like this in dot notation?
var item = {};
item['1'] = 'pen';
var x = 1;
console.log(item[x]); // console will show 'pen'