my structure looks like this:
var Menu = {
crab : 5,
lobster : 4,
potato : 10,
rib : 3,
wings : 8
}, // foodcount1-4 represent the HTML mapping
foodCount1 = document.getElementById('crab'),
foodCount2 = document.getElementById('lobster'),
foodCount3 = document.getElementById('potato'),
foodCount4 = document.getElementById('rib'),
foodCount5 = document.getElementById('wings');
I can't figure out how to access any of the individual variables. I've tried indexing into the object( Menu.i) and I've tried grabbing the other variables like an array (Menu[1]) but I can't seem to get it.
EDIT: Here's what I want to know:
How do I access the other items in the variable? i.e. I have var menu = {...}, food1, food2, food3; how to I get to food1,2 and 3?