Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Mohammed Elagouz
Mohammed Elagouz
2,162 Points

jquery challenge - checking values 3-3

i keep getting Null as result !

 function isValidEmail(email) {
  return email.indexOf('@') != -1;
    };

var $required = $(".required");
function requiredValues() {
    var meh = new Array();
  $required.each(function(){
    meh.push($(this).val());
    });
  return meh;
};





function containsBlanks(){

  if(meh.lenght() === 0 ) true;
  else false;  };

1 Answer

Andrew Chalkley
STAFF
Andrew Chalkley
Treehouse Guest Teacher

meh is defined in another function and a method being called on meh is spelt incorrectly. Also that method is not a method it's a property so you can drop the ().