showing results for - "javascript enumerate"
Sara
16 Jan 2020
1const foobar = ['A', 'B', 'C'];
2
3for (const [index, element] of foobar.entries()) {
4  console.log(index, element);
5}