Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript foreach

const avengers = ['thor', 'captain america', 'hulk'];
avengers.forEach((item, index)=>{
	console.log(index, item)
})
 
PREVIOUS NEXT
Tagged: #javascript #foreach
ADD COMMENT
Topic
Name
1+5 =