- Instant help with your JavaScript coding problems

convert number to string in JavaScript

Question:
How to convert number to string in JavaScript?
Answer:
let num = 123;
let str = '' + num + num; // Output: 123123
Description:

The simplest way to convert a number - eighter int or float - to string is to add it to an empty string using the addition operator (+). 

Share "How to convert number to string in JavaScript?"
Related snippets:
Tags:
int to string, number to string, float to string, integer to string
Technical term:
convert number to string in JavaScript