Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

for in javascript

let items = ['beef', 'cabbage', 'javascript']; // Defines a list of items
for (let item of items) { // Defines for loop with a variable of 'item'
  console.log(item); // Prints the item that is found
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript
ADD COMMENT
Topic
Name
4+5 =