Check out example codes for "convert number to decimal in react typescript". It will help you in understanding the concepts better.

Code Example 1

function formatPrice(Symbol: any) {
    return function (value: any) {
      const price = (value / 100);
      return `${Symbol}${price}`;
    };
  }

  const PriceLabel = formatPrice('£');
  console.log(PriceLabel(2499))

Learn ReactJs, React Native from akashmittal.com