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 254 views
1 answer 125 views
1 answer 143 views
1 answer 128 views
1 answer 104 views
...