SyntaxFix
Write A Post
Hire A Developer
Questions
I personally prefer using the forEach method:
forEach
list.enumerated().forEach { (index, element) in ... }
You can also use the short version:
list.enumerated().forEach { print("index: \($0.0), value: \($0.1)") }