convert a value to $1,222.50 in javascript code example
Example 1: Javascript string to int
var myInt = parseInt("10.256"); //10
var myFloat = parseFloat("10.256"); //10.256
Example 2: number to string javascript
var num = 15;
var n = num.toString(); /* now */ "15"