Hi
A few days back one of my friend ask me to write an interesting JavaScript function. He was doing a lot of calculation in the form with the help of JavaScript, to the give the web page a desktop like feeling. Now he wanted to display the values in certain format.
The format was predefined but was different for different users. The for mat also required the commas to come at different places for different users. Like for user the value would be 1,00,00,00,000 and other it will be 1,000,000,000. Here the commas separation comes after different places for different kind of format. (The other complication of the function was that a comma instead of dot would some time represent decimal separation. But that’s not part of this post.)