title: How would you optimise this javascript if else statement
body: <p>I have been working on building some platform, I couldn't find any other efficient way to optimise othar than given one. What would be your solution to optimise give multiple if else statement?......................................................................</p>
  <pre><code>if (response['total_visits'] == visitNumber.val()) {
    visitNumber.css('color', 'green');
  } else {
    visitNumber.css('color', 'red');
  }
  if (response['best_thing'] == aboutCity.val()) {
    aboutCity.css('color', 'green');
  } else {
    aboutCity.css('color', 'red');
  }
  if (response['fav_attraction'] == favAttraction.val()) {
    favAttraction.css('color', 'green');
  } else {
    favAttraction.css('color', 'red');
  }
  if (response['destination_dining'] == destinationDining.val()) {
    destinationDining.css('color', 'green');
  } else {
    destinationDining.css('color', 'red');
  }
  if (response['method_transport'] == transportMethod.val()) {
    transportMethod.css('color', 'green');
  } else {
    transportMethod.css('color', 'red');
  }
  if (response['age_group'] == ageGroup.val()) {
    ageGroup.css('color', 'green');
  } else {
    ageGroup.css('color', 'red');
  }
  if (response['income_level'] == incomeLevel.val()) {
    incomeLevel.css('color', 'green');
  } else {
    incomeLevel.css('color', 'red');
  }
  if (response['visit_purpose'] == onBusiness.val()) {
  
    onBusiness.css('color', 'green');
  } else {
    onBusiness.css('color', 'red');
  }
  if (response['accomodation_cost'] == accomadationCost.val()) {
  
    accomadationCost.css('color', 'green');
  } else {
    accomadationCost.css('color', 'red');
  }
  if (response['occupation'] == occupation.val()) {
    occupation.css('color', 'green');
  } else {
    occupation.css('color', 'red');
  }
  
  </code></pre>