nerdexam
CIW

1D0-635 · Question #23

Consider the following code: <script type="text/javascript"> var v1 = "alpha"; function f () { var v2 = "bravo"; alert (v1 + ", " + v2); } f(); v1="charlie"; alert (v1 + ", " + v2); </script> What…

Sign in or unlock 1D0-635 to reveal the answer and full explanation for question #23. The question stem and answer options stay visible for context.

Question

Consider the following code:

<script type="text/javascript"> var v1 = "alpha"; function f () { var v2 = "bravo"; alert (v1 + ", " + v2); } f(); v1="charlie"; alert (v1 + ", " + v2); </script> What is the expected result when you run this script in the browser?

Options

  • AAn alert box displaying charlie, bravo
  • BAn alert box displaying alpha, bravo followed by an error
  • CTwo alert boxes displaying alpha, bravo and alpha, bravo respectively
  • DTwo alert boxes displaying alpha, bravo and charlie, bravo respectively, followed by an error

Unlock 1D0-635 to see the answer

You've previewed enough free 1D0-635 questions. Unlock 1D0-635 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1D0-635 Practice