The toString() Method: Please explain me this i am always confussed

The toString() Method: Please explain me this i am always confussed
0.0 0

#1

I am learning Javascript with FCC and also from w3school i am not clear with The toString() Method.
can anyone help me.

thanks& regards,
Manjula


#2

It converts numbers to strings, or arrays to a string representation (comma separated value)

num = 3;
num + num;   // equals the number 6
num.toString() + num.toString();   // equals "33"

arr = [1,2,3,4,5]; 
arr.toString();   // equals "1,2,3,4,5"