325.234 to string?
is it toString()?
325.234 to string?
is it toString()?
Simplest way, concatenate it with an empty string:
325.234 + '';
Which will implicitly call toString() on the number.
You could also use:
String(325.234);
And:
325.234.toString();
var number = 123.54
var string = number.toString();
The "toString()" method is called implicitly when you use a non-string as part of a string concatenation. Such as:
var newString = "Hello " + number;