Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

loop array javascript

var colors = ['red', 'green', 'blue'];
	
	colors.forEach((color, colorIndex) => {
     console.log(colorIndex + ". " + color); 
    });
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #loop #array #javascript
ADD COMMENT
Topic
Name
1+3 =