Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 291 Bytes

File metadata and controls

14 lines (11 loc) · 291 Bytes

Iterate over a String

As was shown with while loops, being able to count up and down lets you iterate over each character in a String.

~void main() {
String name = "Lavigne";

for (int index = 0; index < name.length(); index++) {
    IO.println(name.charAt(index));
}
~}