From ab81dcf1d6b0f1497a596f2cf9890027f3b5d146 Mon Sep 17 00:00:00 2001 From: paper Date: Thu, 16 Jul 2015 16:46:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E7=BB=84=E7=B1=BB=E5=9E=8B=20?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81=E4=B8=80=E7=82=B9=E5=B0=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/chapter3/03_Types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/chapter3/03_Types.md b/source/chapter3/03_Types.md index 327f5e7b..02224959 100644 --- a/source/chapter3/03_Types.md +++ b/source/chapter3/03_Types.md @@ -125,7 +125,7 @@ Swift语言中使用[`type`]来简化标准库中定义`Array`类型的操作 换句话说,下面两个声明是等价的: ```swift -let someArray: String[] = ["Alex", "Brian", "Dave"] +let someArray: [String] = ["Alex", "Brian", "Dave"] let someArray: Array = ["Alex", "Brian", "Dave"] ``` 上面两种情况下,常量`someArray`都被声明为字符串数组。数组的元素也可以通过`[]`获取访问:`someArray[0]`是指第0个元素`“Alex”`。