- iOS 12 Programming for Beginners
- Craig Clayton
- 83字
- 2021-07-02 15:05:00
Checking the number of elements in an array
If you are keeping track, we now have nine items in our array. Luckily, we do not have to keep track of how many items are in our array because we have a property called count. This property will keep track of the current item count and give us the total count of our array when we want to check. Let's look at the count for states:
states.count
Your code will now look like this:

推薦閱讀
- SOA用戶指南
- 物聯(lián)網(wǎng)識(shí)別技術(shù)
- GPS/GNSS原理與應(yīng)用(第3版)
- 計(jì)算機(jī)網(wǎng)絡(luò)安全實(shí)訓(xùn)教程(第二版)
- 新一代物聯(lián)網(wǎng)架構(gòu)技術(shù):分層算力網(wǎng)絡(luò)
- HTML5 Game development with ImpactJS
- 網(wǎng)絡(luò)安全技術(shù)與解決方案(修訂版)
- Mastering JavaFX 10
- 城域網(wǎng)與廣域網(wǎng)(第2版)
- 智慧光網(wǎng)絡(luò):關(guān)鍵技術(shù)、應(yīng)用實(shí)踐和未來演進(jìn)
- Learning Windows 8 Game Development
- 基于IPv6的家居物聯(lián)網(wǎng)開發(fā)與應(yīng)用技術(shù)
- Hands-On Docker for Microservices with Python
- Getting Started with tmux
- 精通SEO:100%網(wǎng)站流量提升密碼