Question: I am new to bootstrap and I am attempting to learn the basics. However, I have put a color background for the div and it is only appears when I have resize the browser. Here is my code:

```
<html>
<body>
    <div id="header">
         <div class="col-md-8"><img src="images/logo.png"></div>
         <div class="col-md-4">
             <br />
             <br />
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             <p>
                 <a href="#">HOME</a>
                 &nbsp; &nbsp; &nbsp; 
                 <a href="#">SERVICES</a> 
                 &nbsp;&nbsp;&nbsp; 
                 <a href="#">NEWS</a> 
                 &nbsp;&nbsp;&nbsp; 
                 <a href="#">CAREERS</a> 
                 &nbsp;&nbsp;&nbsp; 
                 <a href="#">CONTACT</a>
             </p>
         </div>
    </div>
</body>
</html>

.container {
    margin:0px;
    padding:0px;
}           

#header{
    background-color:#e4e4e4;
}

```

Thank you in advance.

Answer: 
You might want to try something like this. You will have to replace the hard coded elements...

```js
var fruits = ["Apple", "Banana"];
var tempString = "Pie,Dumpling,Cider";
var tempArray = new Array();
tempArray.push(tempString);
tempString = "Bread,Republic";
tempArray.push(tempString);
var output = {};
for (var i = 0; i < fruits.length; i++)
{
    var members = tempArray[i].split(",");
    var temp = {};
    for(var k = 0; k < members.length; k++)
    {
        temp[("" + k)] = members[k];
    }
    output[("" + fruits[i])] = temp;
}
console.log(output);
//Different ways to access the objects
console.log(output.Apple);
console.log(output["Apple"]);
console.log(output.Banana[0]);
console.log(output["Banana"]["0"]);
```

[![enter image description here](https://i.stack.imgur.com/zS7gB.png)](https://i.stack.imgur.com/zS7gB.png)
You have two problems in your code:

First, you're never putting `fruits[i]` in the `output` array. 

Second, you can't assign to `output[i][k+1]` until you first initialize `output[i]` to be an array or object.

```
for (i=0; i < fruits.length; ++i)
{
  output.push(fruits[i]);
  var members = document.getElementById(fruits[i]).getAttribute("data-makes");
  var tmp = members.split(",");
  var obj = {};
  for (k=0; k < tmp.length; ++k)
  {
    obj[k+1] = tmp[k];
  }
  output.push(obj);
}

```