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

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:

主站蜘蛛池模板: 湟中县| 石渠县| 武穴市| 嘉善县| 察隅县| 常熟市| 阳信县| 伊川县| 长子县| 漳平市| 江北区| 乳源| 武宁县| 泸西县| 鸡西市| 乌苏市| 巨野县| 榆社县| 湖北省| 通化市| 类乌齐县| 乌拉特中旗| 峨边| 东安县| 东丽区| 封丘县| 池州市| 平南县| 美姑县| 荥经县| 温泉县| 额济纳旗| 如皋市| 闽侯县| 盖州市| 济源市| 长宁县| 永登县| 柞水县| 华池县| 股票|