[SWIFT]indices 란

힐링힐링·2023년 10월 4일
0

SWIFT 문법

목록 보기
9/26

[SWIFT]indices 란

0부터 배열의 길이까지.
0..<arr.count

var arr: [Int] = [11,22,33,44,55]

for i in arr.indices{
    
    print("\(i) 번째 값 \(arr.indices)")
}

profile
블로그 이전합니다 https://james-kim-tech.tistory.com/

0개의 댓글