JavaScript converter número em string
var myNumber=120;
var myString = myNumber.toString(); //converts number to string "120"
Grepper
var myNumber=120;
var myString = myNumber.toString(); //converts number to string "120"
var num = 15;
var n = num.toString(); /* now */ "15"
var num = 15;
var n = num.toString();
var myNumber=120;
var myString = myNumber.toString(); //converts number to string "120"
const num = 123; //> type number 123
const str = num.toString(); //> type string "123"
//Way #1
n = 334
n.toString()
//Way #2
(334).toString()