String Length & String Methods

The length property of a string object returns the number of characters in a string. String methods begin referencing characters within a string with 0 instead of 1, so that the last character position is one less than the actual string length. This can be confusing, so do you know a good memory trick to remember the difference between the two situations?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories