Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript array loop

//Ddefine the array
let items = ["cakes", "banana", "managoes"];
//Using the for loop  
for (let i = 0; i < items.length; i++) {
	console.log(items[i]);
}
//Check to see the items of the arrays in the console
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #array #loop
ADD COMMENT
Topic
Name
9+1 =