Answers for "9.3.2. Iterating Over Arrays"

0

9.3.2. Iterating Over Arrays

/*The following example prints each of the programming languages in the
array languages on a separate line.*/

let languages = ["JS", "Java", "C#", "Python"];

for (let i = 0; i < languages.length; i++) {
   console.log(languages[i]);
}
/*

JS
Java
C#
Python

*/
Posted by: Guest on June-17-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language