Answers for "modern javascript for loop syntax"

0

modern javascript for loop syntax

let friends=["jony","tom","Tejas"];
    for(elements of friends){
        console.log(elements);
    }
Posted by: Guest on July-03-2020
0

what is the modern syntax for iterating through array using for loop in javascript

let friends=["jony","tom","Tejas"];
       friends.forEach(
           function f(i){
               console.log(i);
           }
       )
Posted by: Guest on July-03-2020

Code answers related to "modern javascript for loop syntax"

Code answers related to "Javascript"

Browse Popular Code Answers by Language