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

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:

主站蜘蛛池模板: 正阳县| 玉溪市| 孝感市| 镶黄旗| 迁安市| 惠水县| 增城市| 蓬安县| 岳阳市| 阿拉善盟| 凤冈县| 惠来县| 延吉市| 新乐市| 冕宁县| 东阿县| 耿马| 蓬莱市| 白河县| 明光市| 鹤山市| 阳高县| 昂仁县| 南华县| 康乐县| 乐安县| 汉寿县| 西乡县| 庄河市| 望城县| 高州市| 惠水县| 阳江市| 惠安县| 通许县| 嘉善县| 南开区| 塘沽区| 台东市| 开阳县| 永新县|