Learn Javascript 20117, Arrays, length property, Codecademy

Lesson Summary

In this codecademy tutorial lesson we learn about the length method. The javascript length property allows us to count the numer of items inside of an array. An array is similar to a list and if you have a big enough list and want to count the number of items in it, the .length method is perfect. You can also count the number of characters in a javascript string by attactching .length to it after the quotes, and if it is a string variable then you can just add the .length to the end of it and it should return you the number of characters in the whole string.

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required