Answers for "typescript enumerate array"

3

typescript enumerate array

const someArray = [9, 2, 5];
someArray.forEach((value, index) => {
    console.log(index); // 0, 1, 2
    console.log(value); // 9, 2, 5
});
Posted by: Guest on August-18-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language