Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

iterate array javascript

let array = [1,2,3]; 
for(let element of array){ //iterates over each element, in some cases is necesary to use another type of for
	console.log(element);
}
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #iterate #array #javascript
ADD COMMENT
Topic
Name
2+7 =