diff --git a/source-tw/chapter2/12_Subscripts.md b/source-tw/chapter2/12_Subscripts.md index 16a66470..e418d44b 100644 --- a/source-tw/chapter2/12_Subscripts.md +++ b/source-tw/chapter2/12_Subscripts.md @@ -100,7 +100,7 @@ struct Matrix { init(rows: Int, columns: Int) { self.rows = rows self.columns = columns - grid = Array(count: rows * columns, repeatedValue: 0.0) + grid = Array(repeating: 0.0, count: rows * columns) } func indexIsValidForRow(row: Int, column: Int) -> Bool { return row >= 0 && row < rows && column >= 0 && column < columns