groovy-lecture/live/solutions/schleifen.groovy

8 lines
152 B
Groovy
Raw Permalink Normal View History

2024-06-07 22:06:00 +02:00
def str = "GGRROOOOVVYY IISSTT CCOOOOLL!!"
for(i in 0..<str.length()) {
2024-06-07 22:06:00 +02:00
if (i % 2 == 0) {
continue
}
print str[i].toLowerCase()
}