adplus-dvertising
frame-decoration

Question

What will be the output of the following ?
<script type="text/javascript">
    var name;
    name = "Pritesh";
</script>
<script type="text/javascript">
    document.write(name);
</script>

a.

Nothing will be printed

b.

Pritesh

c.

Error

d.

None of these

Answer: (b).Pritesh

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following ?