Question: How do I convert numbers to strings in JavaScript?

Answer: The simplest way to convert any variable to a string is to add an empty string to that variable, for example:

 

number -> string
a = a+'' // This converts a to string
b += ''  // This converts b to string
string -> number
eval(a);