How to cast (convert) number to string in JavaScript

1 Answer

0 votes
let s = String(13);
console.log(s);
  
s = (19).toString();
console.log(s);
  
const n = 89;
s = n.toString();
console.log(s)
  
  
  
/*
run:
            
13
19
89
      
*/

 



answered Nov 7, 2019 by avibootz
edited Jun 6, 2020 by avibootz

Related questions

1 answer 194 views
1 answer 156 views
1 answer 212 views
1 answer 523 views
523 views asked Jan 9, 2022 by avibootz
4 answers 378 views
1 answer 217 views
217 views asked Apr 5, 2019 by avibootz
...