round to/show two decimals

PHOTO EMBED

Wed Nov 10 2021 13:56:01 GMT+0000 (UTC)

Saved by @KarenStewart #react #javascript

// but answer becomes a string (not usable number)
number.toFixed(2)

// I don't know what parseFloat is - but this was the original answer i received, need to learn why its different than above
 parseFloat(portfolioValue * props.data.current_price).toFixed(2);
content_copyCOPY