Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Raquel King](https://secure.gravatar.com/avatar/789846268459b46330888ea59811feb6?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Raquel King
172 PointsString Values
Complete this code by adding the string property that returns the number of characters inside the string:
"Good morning students!". ___;
I do not understand how to complete this code. How do i add the string property to return the number of characters?
1 Answer
![martinjones1](https://secure.gravatar.com/avatar/ea31110d17ffdbc6cc964e64ed581479?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
martinjones1
Front End Web Development Techdegree Graduate 44,823 PointsHi Raquel,
The property to use is .length
, this is already available to use in JavaScript, so you do not need to create it yourself, you just need to know the property name to use.
You can try it out further here - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length#try_it