Try dividing the number of cents by 100 to get the dollar equivalent. I.E.:
const number = 1629;
const dollars = (cents / 100).toLocaleString("en-US", {style:"currency", currency:"USD"});
dollars
now equals “$16.29”
Try dividing the number of cents by 100 to get the dollar equivalent. I.E.:
const number = 1629;
const dollars = (cents / 100).toLocaleString("en-US", {style:"currency", currency:"USD"});
dollars
now equals “$16.29”