Javascript examples for String:Quiz
Use the concat() method to join the two strings: str1 and str2.
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var str1 = "Hello "; var str2 = "World!"; document.getElementById("demo").innerHTML = str1.concat(str2); </script>/* ww w . ja v a 2 s.c o m*/ </body> </html>