JavaScript konvertieren die Nummer in Zeichenfolge
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"
const numArray = [6, 5, 4];
numArray.toString(); // expected output: 6,5,4
/* You can use map and pass the String constructor as a function,
which will turn each number into a string: */
sphValues.map(String) //=> ['1','2','3','4','5']