How can I make items of two JavaScript arrays correspond to each other?
<p>Delving into arrays today with javascript. I have created two arrays</p>

<pre><code>    var items = ['Bread', 'Milk', 'Butter']
    var calories = [10,20,30]
</code></pre>

<p>The idea is that the calories correspond to the item, so bread has 10 calories. And if I want to see the two arrays combining results then i call this </p>

<pre><code>   document.writeln(items[1] +  calories[1])
</code></pre>

<p>I'm guessing theres a much more efficient way of doing this, but as a newbie I would appreciate any pointers in the right direction. Ideally I want to store all the info in one array</p>
