Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

for each loop with arrowfunction

someValues.forEach((element) => {
    console.log(element);
});

OR

someValues.forEach((element, index) => {
    console.log(`Current index: ${index}`);
    console.log(element);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #arrowfunction
ADD COMMENT
Topic
Name
8+9 =