목록array (1)
개발자의 삽질

https://developer.apple.com/documentation/swift/array Apple Developer Documentation developer.apple.com Swift 에서 2차원 배열 만들기! Array(repeating: Element, count: Int) 를 사용하면 된다. /* [ [1,1,1,1,1], [1,1,1,1,1], [1,1,1,1,1], [1,1,1,1,1] ] */ let arr0 = Array(repeating: Array(repeating: 1, count: 5), count: 4) let arr1 = Array(repeating: [Int](repeating: 1, count: 5), count: 4) let arr2 = Array(repeatin..
Swift
2022. 2. 24. 11:07