Previously, when I needed to store a number of related variables, I'd create a class.
function Item(id, speaker, country) {
this.id = id;
this.speaker = spkr;
this.country = country;
}
var myItems = [
new Item(1, 'john', 'au'),
new Item(2, 'mary', 'us')
];
But I'm wondering if this is a good practice. Are there any other, better ways to simulate a struct in Javascript?