Shared Flashcard Set

Details

1D0-435 Javascript Exam
Flash cards of the 150 test questions
161
Computer Science
Undergraduate 3
02/09/2009

Additional Computer Science Flashcards

 


 

Cards

Term
The string, math, array, and date objects are called ______________ objects.
Definition
language
Term
Joe wants to use JavaScript to access an Oracle database. What JavaScript component does Joe need in order to accomplish this?
Definition
LiveWire
Term
In which section of an HTML page would you define the document object?
Definition
BODY
Term

Which is NOT a type of JavaScript expression?

 

[] assignment

[] logical

[] arithmetic

[] static

Definition
static
Term

What are the two ways that a JavaScript programmer can target frames? (Choose two.)

 

[] By target number in the frames array

[] By frame name.

[] By target name.

[] By frame number in the frames array.

Definition
By target name AND By frame number in the frames array.
Term

Akbar wants to store values in memory that he can then later reference by name on his Web pages. Which of the following are valid names for variables? (Choose all that apply.)

 

[] First Name

[] streetAddress

[] _name

[] @address

Definition
streetAddress AND _name
Term

Joseph wants to use JavaScript on his Web page. His page has a form that he wants visitors to fill out. Why would Joseph want to use JavaScript on an HTML page that contains a form?

Definition
validation
Term

Which of the following is not a benefit of form validation?

 

[] Misuse of bandwidth.

[] Increased validity of form submissions.

[] Increased end-user satisfaction.

[] Conservation of bandwidth.

Definition
Misuse of bandwidth.
Term

Which of the following is NOT a method of the window object?

 

[] prompt ( )

[] confirm ( )

[] alert ()

[] navigator

Definition
navigator
Term
What is the difference between a JavaScript "while" statement and a " do...while" statement?
 

[] The "do...while" statement does not check the conditional expression until after the initial time through the loop. The "while" does check the conditional expression before the initial time through the loop.

[] The "while" statement guarantees that code within curly braces will execute at least one time. The "do...while" statement does not guarantee that code within curly braces will execute at least one time.
  
[] The "while" statement does not check the conditional expression until after the initial time through the loop. The "do...while" statement does check the conditional expression before the initial time through the loop.

[] There is no difference; both do exactly the same thing.
Definition
The "do...while" statement does not check the conditional expression until after the initial time through the loop. The "while" does check the conditional expression before the initial time through the loop.
Term
Meranda wants to find out the browser version of the user so that she can show the correct image map to the user. What property of the navigator object can Meranda use to discover the browser version?
Definition
appVersion
Term
Harry needs to change what is displayed in two frames on his Web page simultaneously. How can Harry do this using JavaScript?
Definition
Harry needs to write a function that includes two location.href lines.
Term

When used within a JavaScript statement, which of the following special characters will create the backspace character?
 
[] \b
[] /b
[] \n

[] \t

Definition
\b
Term
What is the default object in JavaScript?
Definition
window
Term
Which of the following is a JavaScript way to comment out multiple lines of text?
 
[] //
[] <!--...-->
[] /*...*/
[] ;
[] *
Definition
/*...*/
Term
Where is the best location to define a function in an HTML document?
Definition
Between the <HEAD> </HEAD> tags.
Term
Ben has already defined an array called questions. He is now ready to set the values for the first element in the array. Which statement below correctly demonstrates what Ben wants to achieve?
 
[] questions (1) = "What time is it?"
[] questions [1] = "What time is it?"
[] questions[0] = "What time is it?"
[] questions(0) = "What time is it?"
Definition
questions[0] = "What time is it?"
Term
Which JavaScript operator gives a true result if the operands are equal?
Definition
= =
Term
JavaScript programmers most often separate multiple JavaScript statements with which character?
Definition
; (semicolon)
Term
Which code below shows the correct syntax for creating a constructor function?
 

function objectName(parameter1, parameter2, functionName1) {
this.property1 = parameter1;
this.property2 = parameter2;
this.method1 = functionName1
}
    

function objectName(property1, property2) {
this.property1 = parameter1;
this.property2 = parameter2;
this.method1 = functionName1
}
    

function objectName(parameter1, parameter2, method1) {
this.property1 = parameter1;
this.property2 = parameter2;
this.method1 = functionName1
}
    

function objectName(parameter1, parameter2) {
this.property1 = parameter1;
this.property2 = parameter2;
this.method1 = functionName1
}
Definition
function objectName(parameter1, parameter2) {
this.property1 = parameter1;
this.property2 = parameter2;
this.method1 = functionName1
}
Term
Which expression is commonly used for form validation and can also verify the existence of the @ symbol in an e-mail address?
Definition

indexOf( )

Term
A collection of JavaScript statements that perform a given operation is known as a(n) _________________.
Definition
function
Term
What is the best way for a Web server to delete a cookie from a user's computer?
Definition
Reassign the cookie, using an expiration date that has passed.
Term
When would you use the following syntax?

<MAP NAME="World Map">
<Area Coords="0,0, 100, 200" href="homepage.html">
</MAP>
Definition
When defining an image map
Term
What JavaScript character would you use in your code if you want to have a backslash?
Definition
\ \
Term
Robert is building a function using JavaScript and is receiving an error from the code shown below. What can Robert do to correct the function's syntax?

function correctName(firstName; lastName; middleInitial)
{ code to execute goes here }
Definition
Replace semicolons with commas
Term
Joe creates an external JavaScript file called Joesfile. He refers to the file in the following line of code in the body of his HTML document.
<SCRIPT LANGUAGE="JavaScript" src="Joesfile"> </SCRIPT>
The file does not run. Joe checks the code and sees that he left out the extension on Joesfile. What extension should Joesfile have?
Definition
.js
Term
Which is not a valid JavaScript variable name?
 
[] variable1
[] 1variable
[] variable_
[] _variable
Definition
1variable
Term
Which JavaScript operator increases the value of a supplied operand by one?
Definition
+ +
Term

Nick creates a mini-Java application called checkers. He wants to reference it on his web page. What HTML tag should he use to reference checkers?

Definition

<applet>

Term
You want to ask a user if he or she wants to submit a form. What JavaScript method should you use in your code?
Definition
confirm ( )
Term

Which window object method should you use if you want a visitor to your web page to provide his/her name in a popup dialog box?

Definition
prompt ( )
Term
You have created an image shaped like a button to act as a link to a Web page, and you want to make the image change when you move the mouse pointer over it. In which tag can you use the onClick, onMouseOver and onMouseOut event handlers to create this effect?
Definition
<A>
Term
Which object is used to display a drop-down list of items in an HTML form?
Definition
select
Term

Which object of the JavaScript object model can Hudson use to change the background and foreground colors on a web page?

Definition
the document object
Term
You want a user to access the www.ciwcertified.com website when they click on a link. You want the www.ciwcertified.com website to open in a new window that is resizable, has a status bar, a toolbar, and a menubar. The name of the window should be WebMaster. Which of the following will accomplish this?
    

window ("http://www.ciwcertified.com", "WebMaster", "resizable=1, status=1, toolbar=1, menubar=1")
   

open {http://www.ciwcertified.com, WebMaster, resizable=1, status=1, toolbar=1, menubar=1}
    

window ("WebMaster", "http://www.ciwcertified.com", "resizable=1, status=1, toolbar=1, menubar=1")
    

open ("http://www.ciwcertified.com", "WebMaster", "resizable=1, status=1, toolbar=1, menubar=1")
Definition
open ("http://www.ciwcertified.com", "WebMaster", "resizable=1, status=1, toolbar=1, menubar=1")
Term
Which is NOT a feature of Java?
 
[] It uses static binding.
[] It is interpreted on the client.
[] It is object-oriented.
[] It is compiled on a server.
Definition
It is interpreted on the client.
Term
Assignment, arithmetic, string, and logical are types of JavaScript ___________________.
Definition
expressions
Term
Which of the following is a JavaScript way to comment out a single line of text?
 
[] /*...*/
[] //
[] <!--...-->
[] *
[] ;
Definition
/ /
Term
What does B represent in the code below?

for (A, B, C)
{code to execute}
Definition
The condition which will cause the for loop to repeat.
Term
You want to open a new window when a user clicks on a given link. You do not want the user to have access to a menu at the top of the window. Which attribute do you need to assign a value of "0"?
Definition
menubar
Term
What convention is used in JavaScript to relate an object's name with the object's properties or methods?
Definition
dot notation
Term
What root level object contains the button and document objects in the JavaScript object hierarchy?
Definition
the window object
Term
What property of the window object denotes the name of the topmost window displayed?
Definition
top
Term
In the following URL, what is the port?
http://www.ciwcertified.com:80
Definition
80
Term
What is the correct syntax for an if...else statement in JavaScript?
 
    
if (expression)
{statements to execute if true}
else
{statements to execute if false}
    

if {expression}
{statements to execute if false}
else
{statements to execute if true}
    

if {expression}
{statements to execute if true}
else
{statements to execute if false}
    

if (expression)
{statements to execute if false}
else
{statements to execute if true}
Definition
if (expression)
{statements to execute if true}
else
{statements to execute if false}
Term
What is the correct order of operator precedence in JavaScript?
Definition
Innermost parentheses to outermost parentheses, multiplication, division, addition, subtraction.
Term
onUnload is an example of a JavaScript ____________________.
Definition
event handler
Term
Which of the following are language objects in the JavaScript object model? (Choose all that apply.)
 
[] The Time object
[] The Date object
[] The Math object
[] The String object
Definition
The Date, Math, and String object
Term
What is the name of the JavaScript process that links two units of information to form a single unit?
Definition
Concatenation
Term

In the following JavaScript statements, which method is processed first?

alert ("Are we having fun yet?" + prompt("What is your name?" , "") + ".");

alert (confirm ("Are you sure?"));
Definition
the prompt
Term
Which statement is true about the line of JavaScript code below?

var colors = new Array(7)
Definition
The maximum number of values that this array can hold is 8.
Term

William wants to set a document to open in the topmost frame of a 3-frame frameset in JavaScript. What can he use to accomplish this task?

Definition
top
Term
What punctuation mark is used in programming to separate statements from each other, and is not necessary in JavaScript unless statements are being combined?
Definition
semi-colon
Term

Which of the following is defined in JavaScript as a named space of memory?

Definition
variable
Term
You have written the following constructor function code.

function addressBook ( id, title, description, publisher, price) {
this.id = bookId;
this.title = bookTitle;
this.description = bookDescription;
this.publisher = bookPublisher;
this.price = bookPrice;
}

When the script runs the function does not perform as you anticipated. Which of the following corrects your script error?
 

------

function addressBook ( id, title, description, publisher, price) [
this.id = bookId;
this.title = bookTitle;
this.description = bookDescription;
this.publisher = bookPublisher;
this.price = bookPrice;
]

------

function addressBook ( id, title, description, publisher, price) <
this.id = bookId;
this.title = bookTitle;
this.description = bookDescription;
this.publisher = bookPublisher;
this.price = bookPrice;
>

------

function addressBook ( id, title, description, publisher, price) {
this.bookId = bookId;
this.bookTitle = bookTitle;
this.bookDescription = bookDescription;
this.bookPublisher = bookPublisher;
this.bookPrice = bookPrice;
}

------

function addressBook ( id, title, description, publisher, price) {
this.id = id;
this.title = title;
this.description = description;
this.publisher = publisher;
this.price = price;
}
Definition
function addressBook ( id, title, description, publisher, price) {
this.id = id;
this.title = title;
this.description = description;
this.publisher = publisher;
this.price = price;
}
Term

What type of JavaScript operator is the = sign?

Definition
assignment
Term
The JavaScript object model divides objects into what 3 groups?
Definition
browser, language, and form field
Term

Dustin wants to write the chemical notation for water (H20) in JavaScript, using subscript for the 2. What string object method can Dustin use to display the formula correctly?

Definition
sub ( )
Term
You are writing the JavaScript code for a window object. You do not want to use the "name" or "self" property for the window. What property of the window object could you use that is an alternate to these properties?
Definition
window
Term
Sally is building her company's extranet. Which of the following JavaScript objects can Sally use to directly obtain the brand and version that the browser clients use when they connect to her site?
Definition
the navigator object
Term
A complex custom object is ___________________.
Definition
an object in which a property of the object is a complete object by itself with its own properties
Term
At what point can a JavaScript programmer populate a custom object's properties with information?
Definition

After creating an instance of the custom object and declaring a variable.

Term
Another name for "persistent HTML" is ___________.
Definition
cookie
Term
A teacher is trying to explain JavaScript fundamentals to her students. She picks up a cardboard box. She puts some paper and pencils in the box, closes it and hands the box of paper and pencils to a student. The box is used to store and transport the paper and pencils. This is an example of a JavaScript
Definition
method
Term

What operator is used to concatenate strings?

Definition

+

Term
Chris wants to decide when to use a method and when to use a function when working with custom objects. What should you tell Chris to help him understand?
Definition

Methods operate on a single instance of an object, while functions can run on multiple objects in an array.

Term
John is an employee of the ABC Corporation. John has been given authentication credentials to access the company website. When John attempts to access the site a box pops up warning John that the information that he is about to see is confidential and is strictly for employees of the ABC Corporation. This box pops up as the site loads the initial web page. What JavaScript method was used to communicate this warning to John?
Definition
alert ( )
Term

When it was first developed, what name was JavaScript known by?

Definition
LiveScript
Term

Where in an HTML document should one define all JavaScript functions?

Definition
HEAD
Term
What string object method is equivalent to the <B> </B> HTML tags?
Definition
bold ( )
Term
What would happen to Talbot's code below if he left out the count++ line?
var count = 0;
while (count <10) {
document.write(count);
count++;
}
Definition

The code will enter an endless while loop.

Term
When Jan created a custom object, she wanted to reuse some of her JavaScript code by calling an external file. What is the file extension of Jan's external file?
Definition
.js
Term
Harry is new to JavaScript. He has been told that JavaScript programs, if correctly scripted, can be run consistently on any user agent. What is a user agent?
Definition
browser
Term
You are troubleshooting some JavaScript code. The following line is in the code:

<BODY onLoad= "alert('Welcome,' + firstName + ' .' )" >

This line of code is an example of ________________________.
Definition
inline scripting
Term
What is the maximum number of cookies that a domain can store on a user's computer?
Definition
20
Term
You want to send your users to the CNN web site whenever they click on ButtonB. Which of the following is the correct syntax to accomplish this?
 
    

<FORM>
<INPUT TYPE="button" VALUE="ButtonB"
onClick="location.href='http://www.CNN.com';">
</FORM>
    

<FORM>
<INPUT TYPE="button" VALUE="ButtonB"
onClick="location.href={http://www.CNN.com};">
</FORM>
    

<FORM>
<INPUT TYPE="button" VALUE="ButtonB"
onClick='location.href="http://www.CNN.com";'>
</FORM>
    

<FORM>
<INPUT TYPE="button" VALUE="ButtonB"
onClick="location.document="http://www.CNN.com";">
</FORM>
Definition
<FORM>
<INPUT TYPE="button" VALUE="ButtonB"
onClick="location.href='http://www.CNN.com';">
</FORM>
Term
You want to declare a variable called firstName in your JavaScript . What keyword should you use to declare this variable?
Definition
var
Term
Which JavaScript operator gives a true result when either operand is true?
Definition
|  |
Term
Kara is looking for a good example of what a cookie header looks like in a browser. Which of the following demonstrates what Kara is looking for?
 
[] Cookie: name=name; secure
[] Set-Cookie: expires=date; path=path; domain=domain; secure
[] Set-Cookie: name=value; expires=date; path=path; domain=domain; secure
[] Cookie: name=value; expires=date; path=domain; secure
Definition
Set-Cookie: name=value; expires=date; path=path; domain=domain; secure
Term
The switch statement was introduced in JavaScript 1.2. What browsers will properly execute switch statements?
Definition
IE 4.x and later
Term
The onClick event handler does NOT affect the ___________ object in JavaScript?
Definition
form
Term

Which JavaScript statement is the same as a "bypass" or "skip" command?

Definition
continue
Term

How is a JavaScript function called?

Definition
By a function or an event
Term
Jared wants to show the word cool surrounded by quotes and in bold in a JavaScript statement. How can he achieve this in his Web page with JavaScript?
 
[] displaytext = "/"cool"/".bold( );
[] displaytext = 'cool'.bold( );
[] displaytext = "cool".bold( );
[] displaytext = "\"cool"\".bold( );
Definition
displaytext = "\"cool"\".bold( );
Term
Lucas is explaining the concept of JavaScripts's reserved words to Madison. Which of the following is NOT true about reserved words in JavaScript?
 
[] Reserved words cannot be used as objects.
[] Reserved words cannot be used as functions or methods
[] Reserved words can be used as variables.
[] Reserved words cannot be used as variables.
Definition
Reserved words can be used as variables.
Term

What is the difference between the two statements below?

x =5;
x = = 5;

Definition
The first statement declares and sets a variable to equal 5 while the second statement compares x to the value of 5.
Term
Bill is researching the history of JavaScript and wants to know the origins of JavaScript. Which of the following accurately describes the origins of JavaScript?
Definition
LiveScript was made by Netscape Corporation
Term

Danny has created some code for his Web page. He wants to know which event will execute the code shown below. Select the event that will run Danny's code below.

var yourName;
yourName = prompt("What is your full name?","");
alert("Welcome, " + yourName + " to our web site.");

Definition
onLoad
Term
What document object property should you use to represent the default text color used on the document?
Definition
fgColor
Term

Barbara wants a user to access the www.ciwcertified.com website when they click on a link. She wants the www.ciwcertified.com website to open in a new window. In addition, Barbara wants users to be able to access the parent window from the window displaying the www.ciwcertified.com website. Which property of the window object does Barbara have to use?

Definition
opener
Term
Jerry is exploring the use of cookies and needs to know the limitations of cookies. Which of the below statements is true about the limits of cookies?
Definition
A user can store no more than 300 cookies on his or her hard drive.
Term

You are using a variable in your JavaScript. Which data type should you use if you are looking for a true or false value?

Definition
Boolean
Term

What are two ways that can be used to refer to a form object?

Definition
name and its index number in the form elements array
Term
What index number is given to the first slot in any JavaScript array?
Definition
0
Term
What will the JavaScript code below return?

"ACOWBROWNCOW".lastIndexOf("COW",11);
Definition
9
Term
What does the parseFloat( ) function perform in JavaScript?
Definition
Converts a number to a floating point decimal.
Term
What is the most common security concern with cookies?
Definition
Hackers can create code to enter into an endless loop.
Term
What property of an array indicates the total number of items in the array?
Definition
length
Term
Which data types can variables store in JavaScript?
Definition
Numbers, strings, Boolean, or Null.
Term
You want to use JavaScript with an image map. What HTML tag would you embed the script in so that you could call a defined JavaScript function?
Definition
<AREA>
Term

In JavaScript, what type of event occurs when a user gives input to a form element?

Definition
focus
Term
In JavaScript, functions are also called ____________.
Definition
methods
Term
What can Kathy use the continue statement for in JavaScript?
Definition
To force the flow of the loop to return immediately back to the beginning of the loop.
Term
What is the only information required to create a cookie?
Definition
name = value pair
Term
A teacher is trying to explain JavaScript fundamentals to her students. She picks up a cardboard box. The length of the cardboard box is an example of a JavaScript _____________.
Definition
property
Term
What JavaScript statement can a Web developer use to exit a loop?
Definition
break
Term
What JavaScript component do you use if you want to create a custom object?
Definition
constructor
Term
Nosh wants to write some inline JavaScript event handlers in the HTML AREA tag that will display descriptive information about a Paris graphic whenever a user places the mouse pointer over an image map. Nosh also wants to display no text when the mouse is moved away from the image map. What code will perform these tasks for Nosh when placed inside the image map's AREA tag?
 
     

onMouseOver = status = "Come to Paris"; return true;
onMouseOut = status = " "; return true;
     

onMouseOver = "status = 'Come to Paris';"
onMouseOut = "status = ' ';"
     

onMouseOver = "status = 'Come to Paris'; return true;"
onMouseOut = "status = ' '; return true;"
     

onMouseOver = "status = ' '; return true;"
onMouseOut = "status = 'Come to Paris'; return true;"
Definition
onMouseOver = "status = 'Come to Paris'; return true;"
onMouseOut = "status = ' '; return true;"
Term
What type of operator is the JavaScript += ?
Definition
assignment
Term
Which form object of the JavaScript object model has an onSelect event handler?
Definition
text area
Term

Joey wants to create an effect that has an image change colors when a user places the mouse pointer over the image. Which event handler should Joey use?

Definition
onMouseOver
Term
What is the HTML equivalent to italics ( ) string object method?
Definition
<I>
Term
What JavaScript character would you use in your code if you want to create a new line in a list?
Definition
\ n
Term
Jesse wants to dynamically greet each user that visits his Web page. He wants the following text to be written to the browser window as the JavaScript portion of his page is executed:

"Thank you for visiting the Learning Site."

What JavaScript method should Jesse use to accomplish this?
Definition
document.write ( )
Term
What is the difference between a global variable and a local variable?
Definition
A local variable is declared within a function, while a global variable is defined outside of a function.
Term
Which JavaScript method should you use if you want to determine whether a value is a type of numeric data?
Definition
isNaN ( )
Term

A teacher is trying to explain JavaScript fundamentals to her students. She picks up a cardboard box. The cardboard box is an example of a JavaScript _______.

Definition
object
Term

A JavaScript "for" statement is _________________.

Definition
used to repeat a group of statements for a given value range
Term
Which is NOT a feature of JavaScript?
 
[] It is interpreted on the client
[] It cannot write to the hard disk.
[] It uses strong typing.
[] It uses loose typing.
Definition
It uses strong typing.
Term
Jennifer has been told that she can embed a block of JavaScript code within another block of code. What is this practice called?
Definition
nesting
Term
Which statement correctly uses inline scripting?
 
[] <BODY onLoad="alert("Thanks for visiting our site.")">

[] <BODY onLoad=alert("Thanks for visiting our site.")>
 
[] <BODY onLoad="alert('Thanks for visiting our site.')">
 
[] <BODY onLoad=alert('Thanks for visiting our site.')>
Definition
<BODY onLoad="alert('Thanks for visiting our site.')">
Term
A teacher is trying to explain JavaScript fundamentals to her students. She picks up a cardboard box. The box is red. The color (red) of the cardboard box is an example of a JavaScript _____________.
Definition
value
Term
Jill wants to open a new window showing her company's home page with a menu bar, toolbar, status bar, scrollbars and the location entry field. Which statement below will meet Jill's goal?
 
[] open("http://www.jillscompany.com", "", "menubar=1", "toolbar=1", "status=1", "scrollbars=1", "location=1");

[] open("http://www.jillscompany.com", "", "menubar=0, toolbar=0, status=0, scrollbars=0, location=0");

[] open("http://www.jillscompany.com", "", "menubar=1, toolbar=1, status=1, scrollbars=1, location=1");

[] open("http://www.jillscompany.com", "", "menubar=0", "toolbar=0", "status=0", "scrollbars=0", "location=0");
Definition
open("http://www.jillscompany.com", "", "menubar=1, toolbar=1, status=1, scrollbars=1, location=1");
Term
Steve wants to use cookies in his Web site. What can Steve use cookies for when building his Web site?
 
[] To maintain state.
[] To help in authenticating users.
[] To track user behavior.
[] To store the history of sites that a user has visited.
[] All of the above.
Definition
All of the above.
Term
What is the maximum number of cookies that a user can store on his/her computer's hard drive?
Definition
300
Term
JavaScript is known as a(n) ____________ language.
Definition
object-based
Term
What is the building block for all custom objects in JavaScript?
Definition
constructor
Term

Jerry has created a JavaScript loop that continues to execute endlessly. What type of JavaScript statement should Jerry put in the script to exit the loop?

Definition
 break
Term
What tag is used to embed JavaScript in an HTML document?
Definition
<script>
Term
What is a JavaScript statement that transfers the execution of a program to a function, procedure, or to a subroutine?
Definition
calling statement
Term

While Hector composes his JavaScript, he notices that he has 25 if...else statements in the code. He wants to reduce the amount of code. What statement could he use to accomplish this?

Definition
switch
Term
Which type of JavaScript statement should Mary use if she wants to process one block of code when a condition is true, and another block of code when the condition is false?
Definition
if ... else
Term
What JavaScript object, subordinate to the document object, should a Web designer use to create buttons that animate whenever a mouse passes over them?
Definition
image
Term
Which statement below can replace multiple if statements?
Definition
switch
Term
Troy wanted to use a do...while statement instead of the while statement in JavaScript 1.2. What is the key difference Troy needs to consider?
Definition
The do...while statement is guaranteed to execute the statements at least once regardless of whether or not the condition is met, and the while statement will check the condition first before executing statements.
Term

JavaScript variables are __________________.

Definition
case sensitive
Term
Which type of JavaScript statement should Alex use if he wants to process one block of code for as long as a condition is evaluated to be true?
Definition
while
Term
You have a Web page that has grown in popularity. Many sites have links that point to your Web page. What property of the document object should you use in your JavaScript code if you want to know the URL of the Web page that a visitor was viewing before coming to your Web page?
Definition
referrer
Term
Which example below demonstrates how to properly call a function?
 
[] MyFunction<>
[] MyFunction( )
[] MyFunction {}
[] MyFunction[]
Definition
MyFunction( )
Term
You have a created a dialog box in your HTML form so users can enter their e-mail address. You want to use JavaScript to test for the presence of the @ sign in the user's address. What JavaScript method will enable you to do this?
Definition
indexOf ( )
Term
What type of JavaScript operator is the = = sign?
Definition
comparison
Term
Which JavaScript operator divides the left operand by the right operand and calculates the remainder?
Definition
%
Term

What are the rules for naming variables in JavaScript?

Definition
Variables can begin with a letter or underscore.
Term
You write the following code in your JavaScript. Function showResult ( ) [
firstAnswer ( );
secondAnswer ( );
]

The code does not run as you planned. Which of the following would correct the error in the script?

-----     

Function showResult ( ){
firstAnswer ( );
secondAnswer ( );
}

-----

function showResult ( ) ;(
firstAnswer ( );
secondAnswer ( );
);
    
-----

function showResult ( ) {
firstAnswer ( );
secondAnswer ( );
}

-----    

function showResult ( ) (
firstAnswer ( );
secondAnswer ( );
)
Definition
function showResult ( ) {
firstAnswer ( );
secondAnswer ( );
}
Term

What JavaScript character would you use in your code if you want to have a carriage return?

Definition
\ r
Term
Which of the following JavaScript operators evaluates to true when both operands are true?
Definition
& &
Term
Which of the following is the correct way to dynamically write data into a new window?
 
[] document.write( )
[] window,documentName,write( )
[] windowName.document.write( )
[] windowName.document.open( )
Definition
windowName.document.write( )
Term
Top level of the hierarchical structure
Definition
window
Term
Second level of the hierarchical structure
Definition
frames, history, navigator, event, screen, and document
Term
Third level of the hierarchical structure
Definition
links, anchors, images, filters, body, applets, embeds, plug-ins, frames, scripts, all, selection, stylesheets, and forms.
Term
Fourth level of the hierarchical structure
Definition
buttons, checkbox, options, reset, and select buttons
Term
Who invented Javascript
Definition
Netscape - but it was called LiveScript
Term
Document Properties
Definition
title, background color, links, and forms.
Term
Methods of the window object
Definition
open new browser windows and create pop-up dialog boxes.
Term
Methods of the history object
Definition
navigate a user's browser back and forth between previously visited web pages.
Term
Location object
Definition
to compel the user's browser to download and display the contents of any URL that you specify.
Term
Navigator object
Definition
to learn more about a user's browser.
Term
The JavaEnabled method of the navigator object
Definition
specifies whether Java is enabled on the user's browser.
Supporting users have an ad free experience!