Writing Expressions : Manipulating numeric data : Converting a number to a string
 
Converting a number to a string
Convert a number to a string using one of the following techniques:
*Use the JavaScript toString( ) function.
*Add an empty string ("") to the number.
The following expressions yield the same result. If the value of orderID is 1000, both expressions return 10005.
row["orderID"].toString() + 5
row["orderID"] + "" + 5
Any time you combine a literal string with a number, JavaScript converts the number to a string. Be aware of this fact, especially if you want to also manipulate the number mathematically. For example, the following expression changes orderID to a string:
"Order ID: " + row["orderID"]
To perform a calculation and add a literal string, do them in separate steps. Perform the calculation first, then append the string, as shown in the following example:
orderIDvar = row["orderID"] + 10;
"Order ID: " + orderIDvar;
If the value of orderID is 1000, the expression returns
Order ID: 1010