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

Bug with challenge task 4 of 6 in strings methods part 2

There seems to be a problem with the challenge. When I try to add in the correct .subStr(10, 5); to quick on line 21, it says that I have an error on the first challenge and that I have to go back and fix it. I can't seem to get past this part of the challenge.

2 Answers

Kevin Kenger
Kevin Kenger
32,834 Points

Hey Ellen,

The substring method is .substr(), without any capital letters. Try the challenge again without the uppercase S in your method and it should work!

Alexander Folkenflik
Alexander Folkenflik
3,521 Points

I'm having the same issue, and I didn't use caps.

var wordBrown = quick.substr(9, 6);

The error is also confusing: Bummer! Was expecting the string of 'brown' but got ' brown'

--Those look the same to me.

Alexander Folkenflik
Alexander Folkenflik
3,521 Points

Never mind. Resolved. Ellen, your problem may have been the caps issue. This ended up working for me: var wordBrown = quick.substr(10,5);