title: how to avoid use of multiple use of if condition in react or ES6
body: <p>i am trying to verify the data object property and their values.</p>
  
  <p>i tried the below approach instead of writing if else.</p>
  
  <pre><code>let data = {name: "aa", phone: 1, email: "", address: "", age: 0, 
       gender: " "}
  
  let selectedmemberStatus = true;
  if(data.name == "" || data.name.length &lt; 2) selectedmemberStatus = 
      false;
  if(data.phone == "") selectedmemberStatus = false;
  if(data.email == "") selectedmemberStatus = false;
  if(data.address == "" || data.address.length &lt; 3) 
     selectedmemberStatus = false;
  if(data.age == "" || data.age == 0) selectedmemberStatus = false;
  if(data.gender == "") selectedmemberStatus = false;
  </code></pre>
  
  <p>Suggest the best approach to minimise the code. thank you</p>