Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js concatenate strings

const str1 = 'Hello';
const str2 = 'World';

console.log(str1 + str2);
>> HelloWorld

console.log(str1 + ' ' + str2);
>> Hello World
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #concatenate #strings
ADD COMMENT
Topic
Name
5+2 =