Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

loop an array in javascript

let array = ["loop", "this", "array"]; // input array variable
for (let i = 0; i < array.length; i++) { // iteration over input
	console.log(array[i]); // logs the elements from the current input
}
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #loop #array #javascript
ADD COMMENT
Topic
Name
5+8 =