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

James Phillips
James Phillips
23,147 Points

Code Challenge: jQuery Utility Methods

Build an Interactive Website>Form Validation and Manipulation >jQuery Utility Methods>Code Challenge Task1..

Call 'map' on the inputs with the class 'required' and return each of their values and store it in a variable named 'values'.??

I have created the variable - used jquery to select required - called map - and wrote an anon function returning this and val. Still getting error Bummer you havent set the variable values. Please Help.. Thanks. Code below:


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

1 Answer

Chase Lee
Chase Lee
29,275 Points

It worked for me. Try refreshing the the page and try again.

James Phillips
James Phillips
23,147 Points

Thanks Chase #legend i resloved this just did what you advised thanks have a nice day.. :-)