Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript for...of with Arrays

// array
const students = ['John', 'Sara', 'Jack'];

// using for...of
for ( let element of students ) {

    // display the values
    console.log(element);
}
 
PREVIOUS NEXT
Tagged: #javascript #Arrays
ADD COMMENT
Topic
Name
9+5 =