convert number to decimal in react typescript code example
Example: convert number to decimal in react typescript
function formatPrice(Symbol: any) {
return function (value: any) {
const price = (value / 100);
return `${Symbol}${price}`;
};
}
const PriceLabel = formatPrice('£');
console.log(PriceLabel(2499))