This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Animate Your Name Forum

View Course

15 points
A8fa1bf9f16abe4d2fbdd0dea7ce5f3c?s=140&d=retro
Submitted by
barbwalker414
about 3 years ago

What is the purpose of knowing the length of a string? Why is that important?

In one of the beginning lessons, it mentions: To discover the length of a string, write the string within quotes. Then write a period (full stop) and the word length like this:

"Ryan".length.

I just don't get the practical application of it.


0 votes

permalink

One thing you might like to do is enforce a limit on users at your site - you can force them to have passwords of a specified length - but only if you know how to find the length.

3691 points
55df2afa95e3787b9200005e_359368177
Submitted by
Judy
about 3 years ago