Assign the string "Hello World!" to the variable txt. - Javascript String

Javascript examples for String:Quiz

Description

Assign the string "Hello World!" to the variable txt.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

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

<script>
var txt = "Hello World!";
document.getElementById("demo").innerHTML = txt;
</script>//from  w  ww  . ja  v a  2 s .  com

</body>
</html>

Related Tutorials