Horje
javascript number format indian currency Code Example
javascript format currency
function formatToCurrency(amount){
    return (amount).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,'); 
}
formatToCurrency(12.34546); //"12.35"
formatToCurrency(42345255.356); //"42,345,255.36"
javascript number format indian currency
(1234567.8).toFixed(2).replace(/(\d)(?=(\d{2})+\d\.)/g, '$1,') // "12,34,567.80"
Source: medium.com
convert number to indian rupee format in javascript
    var x=12345678;
    x=x.toString();
    var lastThree = x.substring(x.length-3);
    var otherNumbers = x.substring(0,x.length-3);
    if(otherNumbers != '')
        lastThree = ',' + lastThree;
    var res = otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + lastThree;
    alert(res);




Javascript

Related
puppeteer event element change Code Example puppeteer event element change Code Example
javascript string to variable Code Example javascript string to variable Code Example
Javascript replace  div content onclick a button Code Example Javascript replace div content onclick a button Code Example
convert curl response to json format and echo the data Code Example convert curl response to json format and echo the data Code Example
get all id from array of objects javascript Code Example get all id from array of objects javascript Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11