CIW
1D0-635 · Question #23
1D0-635 Question #23: Real Exam Question with Answer & Explanation
The correct answer is B. An alert box displaying alpha, bravo followed by an error. See the full explanation below for the reasoning.
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
Community Discussion
No community discussion yet for this question.