数组

要指定像 [1, 2, 3] 这样的数组的类型,可以使用语法 number[];此语法适用于任何类型(例如 string[] 是字符串数组,等等)。 你也可以看到这个写成Array<number>,意思是一样的。 当我们介绍泛型时,我们将了解更多关于语法 T<U> 的信息。

To specify the type of an array like [1, 2, 3], you can use the syntax number[]; this syntax works for any type (e.g. string[] is an array of strings, and so on). You may also see this written as Array<number>, which means the same thing. We'll learn more about the syntax T<U> when we cover generics.

HX98z65sMkJQvrxufuEYVGMnAETDc+DUUKnZebZ1mezLJkXCRTA/QFt1DvrdJPTB/zBF/cr4G8VGZTpYh79hcxqqx5ucTau50PSFoa4+Ta6d/jsm4uVqXwhVAReiqhiel3Lpj+mDxzESpS+1eG8fyXP8iRycwwHycA/jBn/6n86z974lwBmkCOb1YZZ0ekqKZKKDovOLn0jfYUAjLUqisah0nVA/hNBvfj1ywG7INo1k0VymQrNlL7jrbYdml0MXFHWy1Oz7oYKs+mI8VcGKYpl8FtM0I86QIlsP76ZRXoH6U1d7/qEHue615V6GG4pw7R4jBesQrIdwtVA7d5AlnuZBASzib9IU6R0uojx9VTm7QJr/BDew9IgIdj5b9s2lVlAQGwJmdzxHBfUur8qcJQ==