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

Mathieu Bertolo
Mathieu Bertolo
2,371 Points

Hello, I was ok with the first step, but now I see > "Oops! It looks like Task 1 is no longer passing." Why?

I try several time, it's the same

4 Answers

Hey there Mathieu,

Could you please post some of your code?

Mathieu Bertolo
Mathieu Bertolo
2,371 Points

sure:

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

      var quickLength    = quick.length;
      var indexOfBrown = quick.indexOf("brown");
      var tenthCharacter = quick.charAt(10));
      var wordBrown = quick;
      var quickUpper = quick;
      var quickLower = quick;
</script>

Thanks Mathieu,

So your code seems correct, and it worked on my browser. There seems to be some unnecessary space between the

var quickLength = ....

and its equal sign. I don't know if it's my browser that's rendering as such or a typo? Maybe try fixing that. It should be

 var quickLength = quick.length;

instead of

 var quickLength    = quick.length;

If that doesn't work, (also )take a closer look at your tenthCharacter variable (There are 2 small typos there.)

var tenthCharacter = quick....

Let me know if you found them, if not I'll help you out.

Jessica Lowery
Jessica Lowery
9,901 Points

I had this happen on one of the CSS challenges, & my code was not in the right place to work with both the first & second tasks. The code for the first task may be correct if it's on one line versus another, or outside a certain container, etc. but to make it correct for the second task, those lines of code may need to be in a slightly different place.

Mathieu Bertolo
Mathieu Bertolo
2,371 Points

Thank you Jessica, I tried this, but it's still not fixed