Concatenate the two strings to display "Hello World!". - Javascript String

Javascript examples for String:Quiz

Description

Concatenate the two strings to display "Hello World!".

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
var str1 = "Hello ";
var str2 = "World!";
document.getElementById("demo").innerHTML = str1 + str2;
</script>//w  ww .j a v a  2  s  . co  m

</body>
</html>

Related Tutorials