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

JavaScript JavaScript Foundations Strings Methods

I'm not sure how to answer this question

The challenge question is "Update the variable of 'quickLength' on line 18, to assign the length of the string 'quick'."

  <script>
      var quick = "The quick brown fox jumps over the lazy dog";

          var quickLength    = quick;
          var indexOfBrown = quick;
          var tenthCharacter = quick;
          var wordBrown = quick;
          var quickUpper = quick;
          var quickLower = quick;
    </script>

1 Answer

Shawn Flanigan
PLUS
Shawn Flanigan
Courses Plus Student 15,815 Points

The challenge is asking you to use javascript's length property to find the length of the string and save that value in the variable called quickLength. More on that property can be found here. So, in the end, the line that now reads:

var quickLength = quick;

should be updated to read:

var quickLength = quick.length;