tostring js
var num = 15;
var n = num.toString(); /* now */ "15"
MM.Mirzaei.Dev
var num = 15;
var n = num.toString(); /* now */ "15"
obj.toString()
const num = 15;
const n = num.toString(); /* now */ "15"
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.