Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

foreach in javascript

const avengers = ['IronMan','thor', 'captain america', 'hulk'];
avengers.forEach((item, index)=>{
	console.log(index, item)
})
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #foreach #javascript
ADD COMMENT
Topic
Name
6+4 =