Answers for "9.3.1. Iterating Over Collections//Strings"

0

9.3.1. Iterating Over Collections//Strings

/*The following example prints each of the characters of the string 
"LaunchCode" on a separate line.*/

let name = "LaunchCode";

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

/*

L
a
u
n
c
h
C
o
d
e

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

Code answers related to "Javascript"

Browse Popular Code Answers by Language