how to access indexed array using foreach loop code example
Example: forEach index
const array1 = ['a', 'b', 'c'];
array1.forEach((element, index) => console.log(element, index));
const array1 = ['a', 'b', 'c'];
array1.forEach((element, index) => console.log(element, index));