Get form input value inside function

Get form input value inside function

Trying to figure out why this input value can't be extracted from this function:

  1. function valEmail(selname) {
  2.     $('form.cd-form input[name^="email"]').each(function(selname) {
  3.       if (inputck == 1) {return;}
  4.       if (typeof selname === "undefined") {var email = $(this)}
  5.       else {var email = $('form.cd-form input[name=selname]'); console.log('Inside Defined'); inputck = 1}
  6.       console.log('Email: ' + email);
  7.       console.log('Email val: ' + email.val());
  8.       var elen = email.val().length;
  9.     });  
  10.   }

With this html:

  1. <form class="cd-form otherclass">
  2.   <fieldset>
  3. <div class="icon">
  4.  <label class="cd-label" for="email-">Email</label>
  5.  <input class="email" type="email" name="email-" required>
  6. </div>
  7.        ... other inputs
  8.   </fieldset>
  9. </form>

When valEmail(selname) called, I get:
Email:  object Object 
Email val: undefined

So why is value undefined - how do I get it?  I've verified selname is "email-"

Thanks.