Certbus > CIW > CIW Certified Instructor > 1D0-635 > 1D0-635 Online Practice Questions and Answers

1D0-635 Online Practice Questions and Answers

Questions 4

Assuming the function is called, which script block will display Hello Joe in the document window after you enter the name Joe?

A.

B.

C.

D.

Browse 55 Q&As
Questions 5

Consider the following code fragment, which sets up the retrieval of an XML document named fish.xml and calls a function named showFish(): var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "fish.xml", true); xmlhttp.onreadystatechange = showFish(); xmlhttp.send(); Which line of code initializes the XMLHttpRequest object?

A. xmlhttp.send();

B. var xmlhttp = new XMLHttpRequest();

C. xmlhttp.open("GET", "fish.xml", true);

D. xmlhttp.onreadystatechange = showFish();

Browse 55 Q&As
Questions 6

Which of the following demonstrate the correct syntax for the switch statement?

A. var myName= "Paul"switch (myName){case "Peter"document.write("My name is Peter.
") breakcase "Paul"document.write("My name is Paul.
")break: (default);document.write("I do not have a name.
")}

B. var myName= "Paul"switch (myName){case "Peter"document.write("My name is Peter.
") breakcase "Paul"document.write("My name is Paul.
")break: (default);document.write("I do not have a name.
")}

C. var myName= "Paul"switch (myName){case (Peter)document.write("My name is Peter.
") breakcase (Paul)document.write("My name is Paul.
")break;case: (default);document.write("I do not have a name.
")}

D. var myName= "Paul"switch (myName){case (Peter)document.write("My name is Peter.
") breakcase (Paul)document.write("My name is Paul.
")break;case: (default);document.write("I do not have a name.
")}

Browse 55 Q&As
Questions 7

When using AJAX, what is the purpose of the XMLHttpRequest object?

A. To transfer an XML document to the Web server

B. To request data from the Web server strictly in XML format

C. To read and write to an XML file stored on the local machine

D. To request either XML data or plaintext data from the Web server

Browse 55 Q&As
Questions 8

Which statement will correctly call a JavaScript function without error?

A. var myFunction()

B. initiate myFunction()

C. call myFunction()

D. myFunction()

Browse 55 Q&As
Questions 9

Consider the following code:

What is the expected result when you run this script in the browser?

A. There will be no visible output, but the script will count down to 0.

B. The script will output a countdown from 15 to 0 in the client window.

C. The script will output a countdown from 15 to 1 in the client window.

D. The script will output 15, then 1, because it will only write the first and last values of a while? statement.

Browse 55 Q&As
Questions 10

Which choice best defines events and event handlers?

A. An event can be an action initiated by the user, and an event handler specifies how JavaScript will react to the action.

B. An event is an action initiated by the operating system, and an event handler is a function defined by the user.

C. An event handler can be an action initiated by the user, and an event specifies how JavaScript will react to the action.

D. An event is initiated by an error in JavaScript, and an event handler will attempt to bypass the error and continue.

Browse 55 Q&As
Questions 11

You want to display a series of elements. Which choice demonstrates the correct syntax for an array in JavaScript?

A. var myArray = Array(1,2,3,4,5)for (var i = 0; i < myArray.[i]; i++ ){document.write( myArray[i] + "
" );

B. var myArray = new Array(1,2,3,4,5)for (var i = 0; i < myArray.length ; i++ ) {document.write( myArray[i] + "
" );

C. var myArray = new Array(1,2,3,4,5)for (var i = 1; i < myArray.length; i-- ) {document.write ( myArray.length + "
" );

D. var myArray = Array(1,2,3,4,5)for (var i = 1; i < myArray.[i] ; i-- ){document.write( myArray[i] + "
" );

Browse 55 Q&As
Questions 12

In an X/HTML form, which script block will retrieve an input value and display it back without errors or warnings?

A.
You entered:

C.
You entered:

E.
You entered:

F.
You entered:

Browse 55 Q&As
Questions 13

Which choice demonstrates the correct syntax for declaring a variable?

A. var last name;

B. var andlastname;

C. var "lastname";

D. var lastName;

Browse 55 Q&As
Questions 14

Consider the following code: When an invalid e-mail address is entered, an alert is displayed to the user, but the form submission is not interrupted. What changes need to be made to the script in order to abort the submission if an invalid e- mail address is entered?

A. Add return false after the alert() statement.

B. Change return to validate in the function call.

C. Add validate false after the alert() statement.

D. Remove the return keyword from the function call and put it in front of the alert() statement.

Browse 55 Q&As
Questions 15

What is the purpose of the prototype property in JavaScript?

A. It is used to add properties or methods to a JavaScript object.

B. It returns a list of properties and methods of a JavaScript object.

C. It enables developers to create JavaScript code from a specially formatted prototype flowchart document.

D. It is used to create usage examples of custom objects because its output is not evaluated by the JavaScript interpreter.

Browse 55 Q&As
Questions 16

Which example correctly implements inline scripting with JavaScript?

A.

B.

C.

D.

Browse 55 Q&As
Questions 17

Consider the following code:

When a user clicks on the displayed link, which site will he navigate to?

A. www.msn.com

B. www.yahoo.com

C. www.google.com

D. No other site, because there is a runtime error

Browse 55 Q&As
Questions 18

Consider the following declaration of a custom object:

What needs to be changed to allow this script to run without error?

A. You must remove the car_ prefix on the parameters.

B. You must change the declaration syntax to object carObj.

C. You must add the this keyword to the variables on the left side of the assignments.

D. You must add the keyword var to each line inside the function.

Browse 55 Q&As
Exam Code: 1D0-635
Exam Name: CIW JavaScript Specialist
Last Update: Apr 20, 2024
Questions: 55 Q&As

PDF

$45.99

VCE

$49.99

PDF + VCE

$59.99