I'm working through the course "Javascript: From Fundamentals to Functional JS", and I have a question about objects. I wrote this code as an answer to

`'make the line box[innerBox2].full = false'` not throw an error.

**edit - changed the names of some variables to (hopefully) make it clearer where I'm confused**

My answer is as follows: 

```
var box = {};

//Initialize the property box.myInnerBox to empty object
box.myInnerBox = {};

//Create a new variable to point to the value of box.MyInnerBox, which should be an empty object
var insideBox = box.myInnerBox;

box[insideBox].full = false; // Throws Error

```

But this doesn't work. It seems to be that it doesn't like it when I assign var innerBox2 to box.innerBox2. Why does the above not work, while the code below does? Specifically, how does it know that 'otherBox' is a property of box without first referencing box? Why can't I assign a variable to a property of box? **My question is not about how to use bracket vs dot notation. My question is why assigning `var innerBox2` to the value of `box.innerBox2` does not work**

```
var box ={};
box.otherBox = {};

var innerBox2 = 'otherBox';

box[innerBox2].full = false; // No Error

```

Thanks very much.