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 276 views
1 answer 236 views
1 answer 285 views
1 answer 627 views
627 views asked Jan 9, 2022 by avibootz
4 answers 556 views
1 answer 309 views
309 views asked Apr 5, 2019 by avibootz
...