PrepAway - Latest Free Exam Questions & Answers

Which script block will display Hello World in the browser when the script is run?

Which script block will display Hello World in the browser when the script is run?

PrepAway - Latest Free Exam Questions & Answers

A.
<script type=”text/javascript”>
var message = “Hello “;
var message2 = “World”;
document.write(message + message2);
</script>

B.
<script type=”text/javascript”>
var message = “Hello “;
var message2 = “World”;
document.write(message & message2);
</script>

C.
<script type=”text/javascript”>
var message = Hello ;
var message2 = World ;
document.write(message + message2);
</script>

D.
<script type=”text/javascript”>
var message = “Hello “;
var message2 = “World”;
document.write(“message + message2 “);
</script>

Explanation:

PrepAway - Latest Free Exam Questions & Answers

Leave a Reply