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