- 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:

推薦閱讀
- Mastering Machine Learning for Penetration Testing
- 物聯(lián)網(wǎng)安全(原書第2版)
- 從區(qū)塊鏈到Web3:構(gòu)建未來互聯(lián)網(wǎng)生態(tài)
- Hands-On Chatbot Development with Alexa Skills and Amazon Lex
- 網(wǎng)絡(luò)故障現(xiàn)場處理實踐(第4版)
- Socket.IO Real-time Web Application Development
- 世界互聯(lián)網(wǎng)發(fā)展報告·2019
- 區(qū)塊鏈輕松上手:原理、源碼、搭建與應(yīng)用
- OMNeT++與網(wǎng)絡(luò)仿真
- 高級網(wǎng)絡(luò)技術(shù)
- Hands-On Microservices with Node.js
- 物聯(lián)網(wǎng)的機遇與利用
- Qt5 Python GUI Programming Cookbook
- 網(wǎng)絡(luò)安全之道
- 物聯(lián)網(wǎng),So Easy!