Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

React - assign value based on condition

0 votes
11 views
added Mar 6 in React by LC Marshal Lieutenant (16,990 points)
retagged Mar 6 by LC Marshal
const PropertyTypeTarget = ColumnMainData.result.field_property_type.und['0'].target_id;
  let PropertyType;
  if(PropertyTypeTarget == 35) {
    PropertyType = 'Condominium';
  } else if (PropertyTypeTarget == 36) {
    PropertyType = 'Bungalow';
  }
  else if (PropertyTypeTarget == 36 && 38) {
  }
  else {
  }
  
  <div>{PropertyType}</div>

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...