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 trialRaquel 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
Front End Web Development Techdegree Graduate 44,824 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