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

Jose Guerrero
Jose Guerrero
4,933 Points

Yet another jQuery Utility Methods exercise person stuck

Challenge task 1 of 2: "Call 'map' on the inputs with the class 'required' and return each of their values and store it in a variable named 'values'."

I've gone through the top 5 or 6 forum posts regarding this question and sorted through all types of disgruntled posts. As bad as it feels I've resorted to cutting and pasting all the codes suggested just to get through and I still can't get past challenge task 1 of 2! I'm starting to think there is something wrong with my browser.

This is the latest so called working code I tried:

var $required = $(".required");
var values = $required.map(function(){ 
   return $(this).val();
});

hmmm interesting

1 Answer

Jose Guerrero
Jose Guerrero
4,933 Points

So I took a break, came back the next day and copy and pasted the code I just showed you guys and the darn thing worked.

One thing I noticed before inputting any code is that yesterday there was the .inArray string on the preview pane on the right. This time I had the 3 input fields instead.