- iOS 12 Programming for Beginners
- Craig Clayton
- 197字
- 2021-07-02 15:04:59
Arrays
Arrays are ordered collections of values and can hold any number of items, for example, a list of strings, ints, and floating-point values. Arrays are stored in an ordered list, starting at 0. Let's look at a diagram:

Starting from left to right in the preceding examples, we first have an array that holds a collection of strings. In the second example, we have another array that holds a collection of ints. In our third example, we have an array that holds a collection of mixed data values.
Now, let's review the following diagram, which is a mixed array:

Since this example contains mixed data types, such as strings, ints, and bools, we would have to name this an array type of Any. This means that we can have mixed data types inside our array. Until you are genuinely comfortable with arrays, I would not recommend using mixed data arrays. Try to stick to arrays with the same data type because you will know the exact data type of each element.
An array can hold any data type, but making the array strongly typed means that every element in it must be of the same type.
- 5G承載網(wǎng)網(wǎng)絡(luò)規(guī)劃與組網(wǎng)設(shè)計(jì)
- 物聯(lián)網(wǎng)之魂:物聯(lián)網(wǎng)協(xié)議與物聯(lián)網(wǎng)操作系統(tǒng)
- INSTANT PhpStorm Starter
- 新一代物聯(lián)網(wǎng)架構(gòu)技術(shù):分層算力網(wǎng)絡(luò)
- 物聯(lián)網(wǎng)與無線傳感器網(wǎng)絡(luò)
- NB-IoT物聯(lián)網(wǎng)技術(shù)解析與案例詳解
- 圖解手機(jī)元器件維修技巧
- WordPress Web Application Development
- OMNeT++與網(wǎng)絡(luò)仿真
- INSTANT KineticJS Starter
- Working with Legacy Systems
- 物聯(lián)網(wǎng)場(chǎng)景設(shè)計(jì)與開發(fā)(初級(jí))
- 深入理解OpenStack Neutron
- 網(wǎng)絡(luò)綜合布線(第2版)
- 深入理解Nginx:模塊開發(fā)與架構(gòu)解析