How to iterate over array using for-in loop in Swift

1 Answer

0 votes
let arr = ["swift", "c", "c++", "php", "java"]

for item in arr {
   print(item)
}





/*
run:
 
swift
c
c++
php
java
 
*/

 



answered Feb 7, 2021 by avibootz

Related questions

...