Check out example codes for "typescript enumerate array". It will help you in understanding the concepts better.

Code Example 1

const someArray = [9, 2, 5];
someArray.forEach((value, index) => {
    console.log(index); // 0, 1, 2
    console.log(value); // 9, 2, 5
});

Learn ReactJs, React Native from akashmittal.com