Question: ```
var stooge = {
    "first-name": "Jerome",
        "last-name": "Howard"
};
var properties = [
    'first-name',
    'middle-name',
    'last-name',
    'profession'];
for (i = 0; i < properties.length; i++) {
    console.log(properties[i] + ': ' + stooge[properties[i]]);
}

```

I don't understand `stooge[properties[i]]`. Why are we using bracket before properties?
Can someone explain when to use brackets?

Answer: 
This is just a way to access properties dynamically from an object. In this cause since there is an array of strings, it lets you get the value from the object. Since you can't do something like obj.'some-string'

This might help [JavaScript property access: dot notation vs. brackets?](https://stackoverflow.com/questions/4968406/javascript-property-access-dot-notation-vs-brackets)
Object properties can be accessed with a `.`. or with `[]`. 

But dot notation won't work here.

because if you switch `stooge[properties[i]]` to `stooge.properties[i]` it would return undefined, because the `stooge` object doesn't have a member named `properties`.