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
Nick Manring
11,369 PointsStuck on Form Validation
Ok so I understand that syntax should be understood well before learning concepts or that the videos are not meant to teach syntax (i guess), but I don't understand what I'm doing wrong here...
var required = $(".required"); var values = required.map(function(){ return $(this).val() == "Andrew"; }); return $.inArray(true, values) != -1;
all i get is that the first part of the challenge was now wrong (lines 1 to 4, which work until line 5 is added.)and the second (line 5) was definitely wrong.
I'm trying to check whether Andrew is in the array. I am using the same code used to check for blanks as it describes to do, but I have no idea what i'm doing wrong!
help!
2 Answers
Armando Amador
6,813 PointsAre you stuck on the first or second part of the challenge?
Nick Manring
11,369 PointsOk whoops! Not stuck anymore but thank you!!