Horje
how to concatenate a string in javascript Code Example
how to concatenate strings javascript

var str1 = "Hello ";
var str2 = "world!";
var res = str1.concat(str2);
// does not change the existing strings, but
// returns a new string containing the text
// of the joined strings.
string concatenation in js
var str1 = "Hello ";
var str2 = "world!";
var res = str1.concat(str2);
console.log(res);
js concat variable and string
const txt = "My name is"
console.log(`${txt} Paul`);
string concat javascript
//This method adds two or more strings and returns a new single string.

let str1 = new String( "This is string one" ); 
let str2 = new String( "This is string two" ); 
let str3 = str1.concat(str2.toString());
console.log("str1 + str2 : "+str3)

output:
str1 + str2 : This is string oneThis is string two
js concat string
const str1 = 'Hello';
const str2 = 'World';

console.log(str1.concat(' ', str2));
// expected output: "Hello World"

console.log(str2.concat(', ', str1));
// expected output: "World, Hello"
how to concatenate a string in javascript
let first_string = 'I am a programmer, ';
let second_string = 'I am indisposable.';
let what_i_said  = first_string + second_string;
console.log(what_i_said);

/* OR 
*/

let tell_my_boss = first_string.concat(second_string);
console.log(tell_my_boss);




Javascript

Related
updating json object in mysql database Code Example updating json object in mysql database Code Example
qr code terminal npm Code Example qr code terminal npm Code Example
javascript eval passing variable Code Example javascript eval passing variable Code Example
moment get month day Code Example moment get month day Code Example
how to disable a button in react based on condition Code Example how to disable a button in react based on condition Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8