Summer Sale- Special Discount Limited Time 65% Offer - Ends in 0d 00h 00m 00s - Coupon code: netdisc

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

Page: 1 / 24
Total 244 questions

CIW JavaScript Fundamentals exam Questions and Answers

Question 1

The Microsoft implementation of the Netscape JavaScript language is called _________________.

Options:

A.

VBScript

B.

Java

C.

ECMAScript

D.

JScript

Question 2

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

Options:

A.

function

B.

method

C.

statement

D.

object

Question 3

In JavaScript, there are __________ types of expressions.

Options:

A.

6

B.

7

C.

4

D.

5

Question 4

Some methods are also called functions, because they can return values.

Options:

A.

FALSE

B.

TRUE

Question 5

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 6

JavaScript offer a predefined method for determining when you should use custom objects instead of arrays for your programs.

Options:

A.

FALSE

B.

TRUE

Question 7

The _____________ pair contains the domain name of the URL that issued the cookie.

Options:

A.

URL=URL

B.

domain=domain

C.

path=path

D.

document=document

Question 8

The first character of a variable must not be a letter or an underscore, but subsequent characters can be letters, numbers, and the underscore character.

Options:

A.

TRUE

B.

FALSE

Question 9

Language objects are named with a capital letter. Since JavaScript is case sensitive, using lower case to refer to one of these objects will cause an error.

Options:

A.

TRUE

B.

FALSE

Question 10

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 11

Which of the following is the JavaScript string object special character to insert a new line?

Options:

A.

/n

B.

\n

C.

\b

D.

/b

Question 12

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

Options:

A.

FALSE

B.

TRUE

Question 13

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 14

The method toUpperCase() can also be called a function.

Options:

A.

FALSE

B.

TRUE

Question 15

The _________ method, allows you to create text that is dynamically written to the window as the script is executed.

Options:

A.

document.write()

B.

document.prompt()

C.

prompt()

D.

document.input()

Question 16

If you want to declare a variable that can be accessed by more than one function or script block in your program, you will need to declare the variable ___________________.

Options:

A.

In the HEAD element of the HTML document.

B.

Outside of any function definition.

C.

Inside your function definition.

D.

In the body element of the HTML document.

Question 17

A _________ custom object has only one level of properties and methods associated with it

Options:

A.

multiple

B.

simple

C.

single

D.

complex

Question 18

__________ is used frequently in JavaScript to combine text strings, especially in conjunction with prompt() and alert().

Options:

A.

Concatenation

B.

String()

C.

Instaniation

D.

Confirmation

Question 19

Function blocks begin with the keyword __________ followed by the function name.

Options:

A.

run

B.

SCRIPT

C.

function

D.

method

Question 20

The JavaScript object model divides objects into 3 groups. They are:

Options:

A.

Browser, window and form objects.

B.

Browser, language and form field objects.

C.

Browser, window and document objects.

D.

Window, document and form objects.

Question 21

x!=y will return true if x and y are not equal.

Options:

A.

TRUE

B.

FALSE

Question 22

The built in function parseFloat() __________________.

Options:

A.

converts a currancy formatted number to a decimal formatted number.

B.

converts a number to its integer equivalent.

C.

does not exist.

D.

converts a number to its floating-point decimal equivalent.

Question 23

A __________ is a named space of memory, like a container that holds a value.

Options:

A.

value

B.

prompt()

C.

property

D.

variable

Question 24

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 25

Which is the JavaScript property that is used to inform a script that an image has finished loading?

Options:

A.

final

B.

whole

C.

total

D.

complete

Question 26

Which special character in JavaScript is interpreted as a tab?

Options:

A.

\\

B.

\t

C.

\b

D.

\f

Question 27

Which version of Netscape Navigator first supported JavaScript on Microsoft Windows?

Options:

A.

1.0

B.

1.1

C.

2.0

D.

3.0

Question 28

Consider the following JavaScript code:

“parent.twoframes.frames[1].location.href = “new.htm”

Where does this code place the file new.htm in a three-frame browser window?

Options:

A.

On the left side, running down the entire page.

B.

In the second frame, defined in the twoframes frameset.

C.

In the lower-right frame of the three-frame page.

D.

The two right frames are replaced with one page.

Question 29

Can a cookie identify a user to a Web site even if that user has never submitted personal information to that site?

Options:

A.

Yes – if the user visited a site that uses shared cookies, the user can be identified using data that was passed to another site.

B.

No – commercial sites do not share customer data with other sites; they encrypt cookie information to prevent this.

C.

No – passing this information constitutes an extreme security risk, and no site would jeopardize its uses that way.

D.

It depends on the type of information authorized by the user, which is defined in the User Profile section of the browser administration screen.

Question 30

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.

Question 31

You want to comment out multiple lines of JavaScript.

Which of the following should you use in your code?

Options:

A.

//

B.

<comment>

C.

/”…”/

D.

<!---

Question 32

Can the practice of calling JavaScript functions from framesets be extended to calling them from different browser windows?

Options:

A.

Yes – but only if the Webmaster creates a hard link to the new window.

B.

No – the method used to refer one window to another is always coded in the frameset.

C.

No – JavaScript cannot perform this task; it is handled in the index.txt file.

D.

Yes – the syntax is slightly different, but the concept is basically the same.

Question 33

Methods operate on _________ instances of objects.

Options:

A.

two

B.

three

C.

multiple

D.

single

Question 34

A function that defines methods and properties of a custom object used as a template for instances of the custom object is a _______________

Options:

A.

predefined object

B.

method

C.

constructor

D.

new instance

Question 35

Sven wants to open a new window with JavaScript, be he repeatedly receives an error message. He reviews his code, as shown:

open (“http://www.prolific.com”, “Pro Window” , “toolbar = 1 ,location = 1 ,menubar = 1 ,

scrollbars = 1 ,status = 1 ,resizable = 1”);

Which one of the following choices shows how Sven should rewrite this line of code so that no errors result when it is executed?

Options:

A.

open(“http://www.prolific.com”.”Pro Windows”.”toolbar=!

,location=1,menubar=1,scrollbars=1,status=1,resizable=1 “);

B.

open(“http://www.prolific.com”,”Pro Window “,”toolbar = 1,location =1,menubar = 1 ,scrollbars =

1,status = 1 ,resizable = 1”);

C.

open(“http://www.prolific.com”.”ProWindow

“,”toolbar=1,location=1,menubars=1,scrollbars=1,status=1,resizable=1 “);

D.

open (“http://www.prolific.com”, “ProWindows”,”toolbar = 1,location = 1,menubar = 1,scrollbars =

1,status = 1,resizable = 1 “);

Question 36

function empObject(name, age, department) {

this.name = name;

this.age = age;

this.department = department;

this.showOne = showOne;

}

The code above Defines a constructor function for a custom object named empObject. It contains three properties: name, age, and department. It contains one method: showOne

Options:

A.

TRUE

B.

FALSE

Page: 1 / 24
Total 244 questions