Thursday, February 19, 2009

How to convert a float, interger value to string?

Integer (int) or float value can be converted to string by using the function or method toString().


var a = 3.22;
a.toString(); // "3.22"

var a = 5;
a.toString(); // 5

No comments: