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:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.27.178