Menu
I found this code on the web and was wondering if anybody could comment it so that I could understand how to integrate it into my site.
[CODE]function number_format(n) {
var arr=new Array(‘0’), z=0;
while (n>0)
{arr[z]=”+n%1000; n=Math.floor(n/1000); z++;}
arr=arr.reverse();
for (var z in arr) if (z>0) //padding zeros
while (arr[z].length<3) arr[z]=’0’+arr[z];
return arr.join();
}
Thanks for your time,
Josh