Skip to content

Instantly share code, notes, and snippets.

@ahhmarr
Last active February 25, 2017 03:32
Show Gist options
  • Save ahhmarr/fcbdb3228f82b3e59a53 to your computer and use it in GitHub Desktop.
Save ahhmarr/fcbdb3228f82b3e59a53 to your computer and use it in GitHub Desktop.
number formatting in JS for INR currencies
a=12345;
/**
* this accepts optinal parametes the first one is the Locale Coce ie en-US,en-IN etc and the second is an object which accepts
* conditional formatting params
*
*
**/
b=a.toLocaleString("en-IN",{style:"currency",currency:"INR"});
alert(b);
@Avinashachu007
Copy link

Avinashachu007 commented Feb 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment