React - Remove decimal points with parseInt

0 votes
202 views
added Jun 11, 2020 in React by lcjr First Warrant Officer (11,790 points)
const listingPsf = get(data, 'field_prop_built_up_price_pu_d', '-');


// To use
{listingBuiltUp} sqft · RM {`${parseInt(listingPsf, 10)}`} psf

 

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