How to initialize a 2D array full of zeros in swift?

Just use the array initializer (repeating: , count: ) as follows: var rows = 3 var column = 5 var arrayOfArrayInitialization = [[Int]](repeating: [Int](repeating: 0, count: column), count: rows) That’s all my people, I hope you liked reading this article as much as I enjoyed writing it. If you want to support this blog you can […]

Join our Newsletter!

From beginner-friendly tutorials to advanced coding techniques, the newsletter is designed to help you level up your skills and stay up-to-date with the latest trends in app development.