var str = new String("OnePiece");
console.log(str.toString()); //OnePiece
//it returns a string representing the calling object.
//The toString() method does not change the original string.
//The toString() method can be used to convert a string object into a string.
let x = 123;
x.toString();
(123).toString();
(100 + 23).toString();
var myNumber=120;
var myString = myNumber.toString(); //converts number to string return: "120"
const num = 15;
const n = num.toString(); /* now */ "15"
obj.toString()
toString(123);
toString .
For user-defined Function objects,
the toString method returns a string containing the source text segment
which was used to define the function. JavaScript calls the toString method
automatically when a Function is to be represented as a text value,
e.g. when a function is concatenated with a string.