save int in string javascript code example
Example 1: tostring js
var num = 15;
var n = num.toString(); /* now */ "15"
Example 2: string to int javascript
var text = '42px';
var integer = parseInt(text, 10);
// returns 42
var num = 15;
var n = num.toString(); /* now */ "15"
var text = '42px';
var integer = parseInt(text, 10);
// returns 42