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


Stuck on checking values JQuery code challenge


Create a method called 'requiredValues' that returns an array of all the values of inputs with the class of 'required'.

My Answer:

function requiredValues(.required){
            var blanks = new Array();
            blanks.push($(this).val() == "");
  return blanks.sort().pop(); }

When I put this in it returns back to first task saying it no longer works but first task is correct. Can anyone help..!


4 Answers

John Locke
John Locke
15,479 Points

The jQuery classes were tough for me too. Sometimes when I get stuck, I try searching the forum to see if anyone else has found the solution. When I did a search for "code challenge jquery requiredvalues", this is one of the results that showed up. I hope this helps.


This was a nightmare for me too..that Andrew Chalkley didn't really break things down the way I expected.

I am stuck on this can anyone help? Using the 'inArray' method check if the array contains the string 'Andrew'

My answer is return $.inArray(true, Andrew) != -1; When I put my answer in it does not come up with a Bummer it sends me to previous task.

Kind regards, Neil

I totally lost in some parts, the jQuery lesson doesn't seem as detail as HTML/CSS and Javascript.

HI Beatrice, yeah know what you mean I am finding it difficult to do......it is not broken down like the other projects.

I hope you find the rest ok.