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
Peaches Stubbs
21,320 PointsPerfect code challenge help please.
The task is: In the canSubmit() function add to the return call if the isUsernamePresent() too.
The original code is: `function canSubmit() { return isPasswordValid() && arePasswordsMatching(); }
My answer was: function canSubmit() { return isPasswordValid() && arePasswordsMatching(); return IsUserNameValid() && IsUserNamePresent(): }
That came back as an error. So I tried:
function canSubmit() { return isPasswordValid() && arePasswordsMatching() && isUserNamePresent() ; }
Still came back with error.
May someone point me in the right direction please? Thank You in advance.
3 Answers
Kevin Kenger
32,834 PointsHey!
I think your second iteration of the code is great except for capitalization. You called it as isUserNamePresent() instead of isUsernamePresent(). I think that capital N might be what's tripping you up.
Peaches Stubbs
21,320 PointsThank You so much Kevin I actually blushed when I realized this mistake. So yes I've passed it now :) .
Kevin Kenger
32,834 PointsHaha my pleasure! It's always the little things that get us!
Peaches Stubbs
21,320 Points:D