Is there anyway, given a Symbol, to get its value? I am adding items to a menu from an array using menu.addItem(name,i) where i is the item index in to the array. But when I get the onMenuItem(item) call, item is a Symbol rather a value of 0-n. So is the anyway to take 'item' and convert it to an integer index?
I've tried using item.toString() but it just returns "Symbol" rather than a value.