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

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

thanks& regards,

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" 

1 Like