I seem to be having an issue with decimal places in my code. Currently, it's showing the result as 123 123 12 but I actually need it to be displayed as 12 312 312.
Is there anyone who can assist me with formatting this correctly?
Here is the section of code:
var fcqInteger = parseInt(fcq.replace(/\s/g, ''));
valPrice = parseFloat(valPrice.replace(',', '.'));
var marketCap = (fcqInteger * valPrice)+'';
// result
var marketCapParts = marketCap.match(/[\s\S]{1,3}/g) || [];
marketCap = marketCapParts.join(' ');
Thank you for any assistance provided.