Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript array foreach

const fruits = ['apple', 'orange', 'banana', 'mango'];
fruits.forEach((item, index)=>{
	console.log(index, item)
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #array #foreach
ADD COMMENT
Topic
Name
1+9 =