File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -94,9 +94,9 @@ print("someInts is of type [Int] with \(someInts.count) items.")
94
94
```
95
95
-->
96
96
97
- Alternatively, you can create an empty array of a certain type
98
- using * initializer syntax* ,
99
- which is done by writing the type in square brackets
97
+ Alternatively, you can create an empty array of a certain type
98
+ using * initializer syntax* ,
99
+ which is done by writing the type in square brackets
100
100
followed by parentheses (` [Element]() ` ):
101
101
102
102
``` swift
@@ -115,12 +115,12 @@ print("someInts is of type [Int] with \(someInts.count) items.")
115
115
```
116
116
-->
117
117
118
- Both approaches produce the same result.
119
- However, the empty array literal (` [] ` ) is the preferred way to
120
- initialize an empty array because it is more concise and aligns with
118
+ Both approaches produce the same result.
119
+ However, the empty array literal (` [] ` ) is the preferred way to
120
+ initialize an empty array because it is more concise and aligns with
121
121
the style guidelines used throughout this guide.
122
122
123
- In both cases, you can use the empty array literal (` [] ` ) to
123
+ In both cases, you can use the empty array literal (` [] ` ) to
124
124
reassign an empty array to an existing variable:
125
125
126
126
``` swift
You can’t perform that action at this time.
0 commit comments