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 373 views
1 answer 217 views
1 answer 188 views
2 answers 289 views
2 answers 358 views
...