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?

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

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:



Leave a Reply 0

Your email address will not be published. Required fields are marked *