官术网_书友最值得收藏!

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:

主站蜘蛛池模板: 房产| 璧山县| 靖江市| 佛冈县| 九江市| 长岭县| 新竹市| 绥阳县| 宁德市| 望谟县| 镇江市| 宜章县| 大同市| 民权县| 合阳县| 扎鲁特旗| 从化市| 南宫市| 巴彦淖尔市| 仁寿县| 视频| 兴安盟| 将乐县| 桂平市| 福鼎市| 徐汇区| 巫溪县| 苍梧县| 荣昌县| 隆安县| 井研县| 江门市| 潍坊市| 德清县| 张家港市| 明水县| 鞍山市| 满城县| 贡觉县| 无极县| 高陵县|