Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript foreach index

users.forEach((user, index)=>{
	console.log(index); // Prints the index at which the loop is currently at
});
 
PREVIOUS NEXT
Tagged: #javascript #foreach #index
ADD COMMENT
Topic
Name
2+6 =