How to concatenate two numbers in JavaScript

1 Answer

0 votes
const num1 = 6;
const num2 = 8;

const concatenate = '' + num1 + num2;

console.log(concatenate); 
 
 
     
     
/*
run:
     
"68"
     
*/

 



answered Jun 19, 2022 by avibootz

Related questions

3 answers 372 views
1 answer 214 views
1 answer 187 views
2 answers 288 views
2 answers 358 views
...