forEach is the preferred way of dealing with loop in a Senior life. for in is what you learn in school. Or in other words, next step of walking – running.
Do it like adults do.

// Don't
for val in sequence {

// Do
sequence.forEach {

// Do
sequence.forEach { value in

Of course there are times when you need for in, but more about that later on.

Leave a Comment