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 182 views
1 answer 150 views
1 answer 204 views
1 answer 518 views
518 views asked Jan 9, 2022 by avibootz
4 answers 361 views
1 answer 210 views
210 views asked Apr 5, 2019 by avibootz
...