1:to string的性能上比较:
(""+) > String() > .toString() > new String()
2:其他类型转化的例子:
var myVar = "3.14159",
str = "" + myVar, // to string
num=+myVar, // to number
i_int = ~ ~myVar, // to integer
f_float = 1 * myVar, // to float
b_bool = !!myVar, /* to boolean - any string with length
and any number except 0 are true */
array = [myVar]; // to array