Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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);
Comment

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);
Comment

PREVIOUS NEXT
Code Example
Javascript :: what would (int) (Math.random()) output 
Javascript :: ucwords javascript 
Javascript :: uploading json data to s3 bucket in node js 
Javascript :: can you get reinfected with the coronavirus 
Javascript :: javascript check number length 
Javascript :: JSON to Ruby Hash Parser 
Javascript :: npm html-validate 
Javascript :: Material-ui alarm icon 
Javascript :: vuejs cordoba pantalla en blanco 
Javascript :: loop number in react 
Javascript :: setup neovim vscode jj hotkey 
Python :: python check if path does not exist 
Python :: python shebang 
Python :: angle names matplotlib 
Python :: pandas see all columns 
Python :: python current year 
Python :: pip install mysqldb 
Python :: Python pandas drop any column 
Python :: time it python 
Python :: how to get the url of the current page in selenium python 
Python :: how to check python version 
Python :: python get line number of error 
Python :: python text tkinter not typable 
Python :: python pandas change or replace value or cell name 
Python :: take space separated int input in python 
Python :: remove axis in a python plot 
Python :: python find and replace string in file 
Python :: how to check if python has been added to path 
Python :: how to fillna in all columns with their mean values 
Python :: python remove last character from string 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =