if multiple variable are empty jquery

Question!

Help why is this not working. Im trying to check lots of inputs if they are empty, Im getting SyntaxError error.

if (fname  === '') || (lname  === ''){
  alert('Text-field is empty.');
  return false;
}


Answers
if ((fname  === '') || (lname  === '')) {
  alert('Text-field is empty.');
  return false;
}

All if-statement conditions must be wrapped in parentheses.

By : Neil A.


This video can help you solving your question :)
By: admin