Answers for "enumerate node js"

3

enumerate node js

const foobar = ['A', 'B', 'C'];

for (const [index, element] of foobar.entries()) {
  console.log(index, element);
}
Posted by: Guest on September-08-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language