<html>
<body>
<p id="demo">Click the button to join three strings into one new string.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction()
{
var txt1 = "Hello ";
var txt2 = "world!";
var txt3=" Have a nice day!";
var n=txt1.concat(txt2,txt3);
document.getElementById("demo").innerHTML=n;
}
</script>
</body>
</html>