how to pass array in data in loop in javascript code example
Example 1: iterate array in javascrpt
let array = [ 1, 2, 3, 4 ]; //Your array
for( let element of array ) {
//Now element takes the value of each of the elements of the array
//Do your stuff, for example...
console.log(element);
}
Example 2: javascript iterate array
String[] myStringArray = {"Hello", "World"};
for (String s : myStringArray)
{
// Do something
}