I have created a multidimensional array in the following way:
var languageArray = {};
$('#language li a img').each(function(index) {
var helperArray = [];
helperArray.push(langi);
helperArray.push(getnumber);
languageArray.push(helperArray);
});
Now, I am looking to iterate over it with a loop:
for (var index = 0; index < languageArray.length; index++)
{
alert(languageArray[index][0] + " " + languageArray[index][1]);
}
Whether it is an array or an object, I need to iterate over it using a loop. How can this be achieved with both an array and an object?
Thank you!