New Year Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

CIW 1D0-435 CIW JavaScript Fundamentals exam Exam Practice Test

Demo: 36 questions
Total 244 questions

CIW JavaScript Fundamentals exam Questions and Answers

Question 1

A user can never delete or disable cookies

Options:

A.

TRUE

B.

FALSE

Question 2

Placing // in front of a line of text, within the Script tags will result in ______________

Options:

A.

the command that follows being carried out

B.

everything that follows being ignored

C.

nothing, as this is not valid

D.

everything to the end of the line being ignored.

Question 3

In JavaScript, ++x+ will add one to the value of x after the assignment is complete.

Options:

A.

FALSE

B.

TRUE

Question 4

JavaScript is an event-driven programming language. Events trigger _________.

Options:

A.

functions

B.

behaviors

C.

methods

D.

actions

Question 5

VBScript was the first scripting language developed for Webpage design.

Options:

A.

True

B.

False

Question 6

What willthe following JavaScript code do when it runs?

<SCRIPT Language="JavaScript">

<!--

var d=new Date;

var h=d.getHours();

var msg="";

var targ;

if(h<12)

msg="<h1>Good Morning!</h1>";

else if(h>=12 && h<18)

msg="<h1>Good Afternoon!</h1>";

else

msg="<h1>Good Evening!<h1>";

document.write(msg);

/-->

</SCRIPT>

Options:

A.

It will write "Good Afternoon!'

B.

If it is before noon, it will write "Good Morining!", if after noon but before 6 pm, "Good Afternoon!" if after 6 pm, "Good Evening!"

C.

It will write "Good Evening!"

D.

It will write "Good Morning!'

Question 7

The ____________ contains path information for the URL that issued the cookie.

Options:

A.

path=path pair

B.

domain=domain pair

C.

name=value pair

D.

url=url pair

Question 8

The form element ___________ is used for a single-line text field used for data entry.

Options:

A.

text

B.

data box

C.

data

D.

textarea

Question 9

Regarding cookies: If the expires attribute is not used, when will the cookie expire?

Options:

A.

in 10 days

B.

in 3 days

C.

in 30 days

D.

at the end of the user's session with the Web application

Question 10

In JavaScript terms, a sentence on a page is an example of ____________

Options:

A.

an object

B.

a property

C.

a method

D.

a value

Question 11

The button object is the simplest of all objects. Its main event handler is __________.

Options:

A.

onClick

B.

onSubmit

C.

Click

D.

onReset

Question 12

Which form element would you use to create a scriptable button other than a reset or submit button?

Options:

A.

reset

B.

frm.Button

C.

button

D.

form.button

Question 13

The term __________________ refers to any application, such as a Web Browser or help engine, that renders HTML for display to users.

Options:

A.

browser window

B.

Internet Explorer

C.

user agent

D.

browser agent

Question 14

If a function is not a built in function, then it is a _________________ function.

Options:

A.

canned

B.

user-defined

C.

object based

D.

Java

Question 15

The __________ is the building block of all custom objects.

Options:

A.

statement

B.

function

C.

variable

D.

constructor

Question 16

A __________ is an organized block of code that handles actions generated by user events.

Options:

A.

function

B.

method

C.

statement

D.

object

Question 17

What would the following JavaScript code return?

"SANDY COBB".charAt(3);

Options:

A.

N

B.

n

C.

d

D.

D

Question 18

The _______ indicator delineates a comment on a single line of script.

The _____ indicator is used for multiple line comments.

Options:

A.

//, /*.....*/

B.

//, /.../

C.

//,*/...*/

D.

/*.....*/, //

Question 19

A (an) _________ is a programming function that models the characteristic of abstract or real "objects" using classes.

Options:

A.

method

B.

attribute

C.

object

D.

value

Question 20

The key difference between the While Statement and the Do While Statement is ____________

Options:

A.

The Do While Statement does not check the condition until it has iterated the loop at the first time. The While Statement will check the condition before beginning the first loop.

B.

None. There is no Do While loop in JavaScript.

C.

The While Statement does not check the condition until it has iterated the loop at the first time. The Do While Statement will check the condition before beginning the first loop.

D.

The Do While Statement will check the condition before it loops the first time. The Do While Statement will never check the condition.

Question 21

A server named www.thisserver.com can set a cookie for the domain www.thatserver.com.

Options:

A.

FALSE

B.

TRUE

Question 22

Which of the following is the correct way to test for the presence of a cookie?

Options:

A.

test(document.cookie);

B.

alert(document.cookie);

C.

document.cookie

D.

prompt(document.cookie);

Question 23

JavaScript is a strong object-oriented language that relies, for a large part of its functionality, on objects and their attendant methods and properties.

Options:

A.

False

B.

TRUE

Question 24

To instantiate and then populate the properties of each new instance with actual data, you must _________ _________.

Options:

A.

declare functions

B.

declare variables

C.

create values

D.

call the function

Question 25

Which of the following, if any, shows the appropriate syntax for accessing a function stored in a frame file?

Options:

A.

relationship.frameName.functionName();

B.

relationship.frameName.objectName;

C.

frameName.functionName();

D.

None. This cannot be done.

Question 26

Tanja wants to target the “parent” frame of all frames in her Web site. In HTML, this parent frame is called “_top”.

What is this parent called if Tanja decided to use JavaScript in her Web page?

Options:

A.

The parent of all Web pages is called index.html.

B.

The parent is called “top” in JavaScript.

C.

The word “parent” is a slang reference to main.html and cannot be targeted.

D.

It depends on how the pages are identified; the “parent” page will be referred to as such in Tanja’s schema.

Question 27

Ling wants to add a button to her Web page that will transport the user to another Web page. She does not to use a hyperlink, so she includes the following JavaScript:

onClick = “href(http://219.155.184.2);” >

The code does not function as Ling intended.

Which of the following choices shows how she should rewrite the script to make it function correctly?

Options:

A.

onClick=”location.href=”http://219.155.184.2’:” >

B.

onClick=”href = ‘http://219.155.184.2’: “ >

C.

Click=”href=”http://219.155.184.2’:” >

D.

onClick=”location.href=”http://219.155.184.2“;” >

Question 28

VBScript and _____________ are scripting languages that are similar in purpose. Both extend the capabilities of static Web pages.

Options:

A.

C++

B.

Visual Basic

C.

JavaScript

D.

Java

Question 29

What is a constructor function in JavaScript?

Options:

A.

A special function that enables the recursion of functions throughout the Web site.

B.

A special function that allows the construction of objects.

C.

Any function that allows databases to be parsed without being loaded entirely into memory.

D.

Any function that allows the definition of any object as a global rather than a specific instance.

Question 30

Wilhelm is creating a Web page using JavaScript. He wants to set a cookie with each site visitor so that his Web server can recognize visitors on subsequent visits for one month.

Which one of the following choices contains the elements required in this cookie?

Options:

A.

CGI script that requires the visitor to provide name and address.

B.

The name=value and user=ID fields.

C.

The name=value and expires=date fields.

D.

The “secure” keyword and all the key=value pairs.

Question 31

The main event handler associated with the checkbox object is _________.

Options:

A.

Click

B.

onReset

C.

onClick

D.

onSubmit

Question 32

The ________ method request user input through a text field within a dialog box.

Options:

A.

request()

B.

alert()

C.

confirm()

D.

prompt()

Question 33

What is the JavaScript term for a string value that represents the URL of the document from which the current document was accessed?

Options:

A.

Referrer

B.

Location

C.

Link

D.

Anchor

Question 34

Which is the best definition of a JavaScript instance?

Options:

A.

A time-limited set of values taken from a database

B.

An example of a field in a database

C.

An example of an object

D.

A static representation of real-time data

Question 35

Which special character in JavaScript is interpreted as a new line?

Options:

A.

\\

B.

\n

C.

\b

D.

\t

Question 36

When using custom JavaScript objects, why should you use arrays of instantiate each object individually?

Options:

A.

If the Web browser must parse the same code repeatedly, your computer will probably run more slowly.

B.

Because JavaScript requires more time to instantiate objects individually than does Perl or another scripting language.

C.

Arrays are more efficient because they are flexible and they are indexed, thus repetitive tasks are easier to handle.

D.

Because JavaScript handles memory so poorly, it is impossible to write single variables that function in any number.

Demo: 36 questions
Total 244 questions