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 282 views
1 answer 244 views
1 answer 292 views
1 answer 637 views
637 views asked Jan 9, 2022 by avibootz
4 answers 564 views
1 answer 316 views
316 views asked Apr 5, 2019 by avibootz
...