Consider only the following code:

Which of the following would properly supply the sum of the two numbers?
A. return sum;
B. mySum (num1+num2);
C. return num1+num2;
D. return sum(num1+num2);
Consider the following code:

What is the expected result of this script?
A. When you leave the page, the alert box will display.
B. The page will ignore the function, so a blank page will display on entry and exit.
C. When you enter the page, you will be warned that there is unfinished JavaScript to run.
D. When you leave the page, there will be a JavaScript error because you cannot unload an alert box.
Which statement is true about the getElementByID() method?
A. It returns only the first element with the specified ID.
B. It returns an array containing all elements with the specified ID.
C. If a match is not found for the specified ID, it will attempt searching by name.
D. If a match is not found for the specified ID, it will attempt searching by tag name.
Which statement will open this Web document in a new browser window?
A. document.open(http://www.CIWcertified.com);
B. window.open(http://www.CIWcertified.com);
C. window.open("http://www.CIWcertified.com");
D. document.open("http://www.CIWcertified.com");
Consider the following code:

What output will appear in the browser when you run this script?
A. "1, 2, 3, 4, 5, 6, 7, 8, 9"
B. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
C. 1, 2, 3, 4, 5, 6, 7, 8, 9,
D. "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
Consider the following code:

What is the expected result when you run this script in the browser?
A. A window alert box will display Hello.
B. A window alert box will display Goodbye.
C. No window alert box will appear because there is an error in the code.
D. A window alert box will display Hello then a second alert box will display Goodbye.
Which example correctly implements inline scripting with JavaScript?
A.
B.
C.
D.
How is the alert() method different from prompt() and confirm()?
A. The alert() method generates a modal dialog box, which requires user action before the next JavaScript instruction can be executed,whereas prompt() and confirm() do not.
B. The alert() method requires only one parameter, whereas prompt() and confirm() require two parameters.
C. The alert() method requires two parameters, whereas prompt() and confirm() require only one parameter.
D. The prompt() and confirm() methods return a value, whereas alert() does not.
Maria, a 22-year old student, is testing her JavaScript application, which includes the following code: Assuming Maria enters truthful information, what is the value of z after executing this code?

A. No value ?error in line 1 due to missing var keyword for userAge.
B. No value ?error in line 1 due to multiple declarations in one line.
C. Maria "is" 22 "years old"
D. Maria is 22 years old
Consider the following code:

A. Replaces the text CIW with the text http://www.CIWcertified.com
B. Replaces the text CIW with a link that reads myLink and points to the URL www.CIWcertified.com
C. Converts the text CIW into a link that reads CIW and points to the URL www.CIWcertified.com
D. Returns true if the content of the is a link to www.CIWcertified.com, or returns false if the content of the is not a link towww.CIWcertified.com