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

charlesporter
3,308 PointsInteractive Website - Code Challenge - Checking Values - can't get my code to work
Hello Internet, I cant seem to get my code to work for the Checking Value Code challenge for interactive Websites Challenge task 2 of 3 Create a method called 'requiredValues' that returns an array of all the values of inputs with the class of 'required'. My Code looks like this:
var $required = $(β.requiredβ);
function requiredValues(){
var valuesof = new Array($required);
return valuesof;
}
3 Answers

Chris Akers
2,527 PointsHi C P,
It looks like your code is returning an array which contains all the html elements with the required class. Rather than the elements themselves, the function should be returning the values of those elements.

charlesporter
3,308 PointsI believe I understand what you are saying but I cant seem to get a method together that passes. It appears you are telling me to deal with the return line but I cant find a .value or anything like that that will work. Please provide a hint or something that may lead me in the right direction.

charlesporter
3,308 PointsI kept working at it and got all three code challenges. I actually found another treehouse forum discussion that was helpful. The foundation for this type of code is not taught very well in this section and needs to be reformatted.