Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript enumerate

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

for (const [index, element] of foobar.entries()) {
  console.log(index, element);
}
 
PREVIOUS NEXT
Tagged: #javascript #enumerate
ADD COMMENT
Topic
Name
6+9 =