I have a function that receives an array of objects. The objects are key-value type. The function is for iterating over each array item (object) and diplay its content.
function displayData(myArray) //for debugging
{
for(var i=0; i<myArray.length;i++)
{
console.log(myArray[i]);
}
}//end displayDay
When I call this function I get this error:
JPM [error] Message: SyntaxError: missing ) after formal parameters
I checked previous posts that says I must split the array and send it as a string. In this way, I may need to parse the string inside the loop. Is there a simple way to iterate over an array items (objects) in javascript? In arrays, I will set a loop that stops when the length of the array is reached. Can you clarify when shall I stop in a string?