logo image

JavaScript program to Join two given strings

30


Following program shows you how to Join two given strings. In this program we get strings from user and join those strings

var string1 = prompt("Please enter the first string:");
var string2 = prompt("Please enter the second string:");
var output = string1 + string2;
console.log("Joined string is: " + output);

Output:

Please enter the first string:
hello
Please enter the second string:
world
Joined string is: helloworld