CIW 1d0-735 practice test

CIW JavaScript Specialist Exam Exam


Question 1

What is the best practice for testing code to pinpoint a logic error within a script?

  • A. Test the code in the W3C code validator.
  • B. Conduct a manual, line-by-line, code review.
  • C. Check for console errors when loading the page.
  • D. Insert watchpoints and comment out code blocks.
Answer:

D

Discussions

Question 2

Which code could be used to send a user to another Web site when they click a button on the Web
page?
A)

B)

C)

D)

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Answer:

D

Discussions

Question 3

Consider the following code:

Charies wants to write code to execute the changeOption function after the user chooses an option
in the select menu. What change to the code should he make?

  • A. Change line 7 <select name=’’mySelectBox ‘’ onchange=changeOption () “>
  • B. Change line 2 to function changeOption (onchange){
  • C. Change line 6 to <form name=”myform’’ cosubmit=’’changeOption ( ) ‘’>
  • D. Change line 6 to <input type=”submit’’ onchange=’’changeOption () ‘’ />
Answer:

A

Discussions

Question 4

Which script will display Configurations, you won! In the browser when the script is run?
A)

B)

C)

D)

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Answer:

B

Discussions

Question 5

Consider the following code:

What code would you use to determine if the check box has been checked or not?

  • A. Document.form[0].termsService.selected
  • B. Document.form[0].termsService.validityState
  • C. Document.form[0].termsService.checked
  • D. Document .form[0].termsService.value
Answer:

D

Discussions

Question 6

Which of the following is not a best practice when using JavaScript libraries?

  • A. Developers should ensure the library functions they use are cross-browser compatible for the version of HTML they are using.
  • B. Developers should link to the library file and to each plug in script in the <head> section of the HTML document using the <script> tag.
  • C. Developers should use plugins from a variety of JavaScript libraries to ensure compatibility.
  • D. Developers should become familiar with one library then optimize HTML code with that specific library in mind.
Answer:

A

Discussions

Question 7

What is the output when you run the following script in the browser?

  • A. Elephant Zebra Lion Giraffe
  • B. Elephant Lion Giraffe
  • C. Zebra Elephant Lion Giraffe
  • D. Zebra.Elephant Giraffe
Answer:

A

Discussions

Question 8

Consider the following code:

What does line 9 do?

  • A. Nothing it must written as supportTicket. prototype, this, resolve = resolve ; to add the properly resolved to the custom supportTicket object
  • B. it add the property resolved to the original instantiated custom supportTicket object ticket1.
  • C. it add the property resolved to the newly instantiated custom supportTicket object ticket1.
  • D. it add the property resolved to all instances instantiated custom supportTicket object ticket1 and ticket2.
Answer:

B

Discussions

Question 9

Consider the following code:

What change if any needs to be made for a "Thank you" message to appear when the checkout page
is loaded?

  • A. On fine 11 onupload need to be changed to onload.
  • B. On line 8 alter needs to be changed to prompt
  • C. On line 11, onupload needs to be changed to onload.
  • D. No changes needed. The alert message will appear when the page is loaded.
Answer:

C

Discussions

Question 10

Consider the following code:

What is the expected result of this script?

  • A. The word "Welcome" will be displayed in a prompt when the page loads
  • B. A welcome message will appear when the page loads
  • C. When you click the alert a welcome message will appear
  • D. When you click the welcome message a welcome alert will load
Answer:

C

Discussions
To page 2