final exam for is
while ( count > -1 ) {total = total - 10;count = count - 1;
60
The code ½ will produce which fraction?
1/2
for ( var count = 0; count < 10; ++count ) { if ( count == 5 ) continue;
10
while ( i < 5 ) {if (i != j)counter = counter + i; i = i + 1}document.write( counter
7
To which text does the following CSS rule apply: li em { color: red; font-weight: bold }
<li><em>text</em></li>
Text put between the ________ tags appears in the browser's title bar (i.e., the dark bar at the top of the browser window).
<title></title>
An unordered list is created using which notation?
<ul>
Which of the following is not a valid JavaScript equality or relational operator?
=
Which statement is false?
A class is an instance of its object
How will the following CSS rule alter the web page if it is applied in a style sheet? h1 { font-family: Arial, sans-serif }
All text in h1 elements will use a sans-serif font if Arial is not supported by the system.
Which of the following are valid names of scopes in JavaScript?
Both local and global.
Today, virtually all new major operating systems are written in:
C or C++
The term Web 2.0 was coined by ________ in 2003.
Dale Dougherty
What does the following CSS rule do? .note { font-size: 1.5em }
It multiplies all text element font sizes with class = "note" by 1.5.
Which of the following languages was designed to enable the writing of programs that will run on a great variety of computer systems and computer-controlled devices?
Java
is a language that helps you build dynamic web pages (i.e., pages that can be modified "on the fly" in response to events, such as user input, time changes and more) and computer applications.
JavaScript
Which of the following is a mathematical constant?
Math.LN10
for ( var i = 0; i < 5; i++ ) document.write( "O" );
OOOOO
models software in terms similar to those that people use to describe real-world objects.
Object-oriented design
________ is a technique in which digital data is sent in small bundles that contain address, error-control and sequencing information.
Packet switching
Web technologies standardized by the W3C are called
Recommendations
The ________ element describes content that usually appears at the bottom of the content or section element.
The correct answer is: footer
var value = theArray1.join( " " );
The join method will create a string from the values in theArray1.
What is the significance of the second function argument in the following line? window.setInterval( "run()", 100 );
The value sets how often to run the function.
What does the following statement do? Math.floor( Math.random() * 12 );
This creates a random number from 0 up to but not including 12.
Which language was developed by Microsoft in the early 1990s to simplify the development of Windows applications?
Visual Basic
The hover pseudo-class allows you to change to an element's style in which situation?
When the mouse is over the element
The ________ allows people worldwide to donate their unused computer-processing power, harnessing unused capacity.
World Community Grid
document.writeln( "Passed." ); else document.write( "Failed. " );
You must take this course again.
Which of the following is the proper method to access the length of the array arr?
arr.length
_________ are data structures consisting of related data items (sometimes called collections of data items).
arrays
An HTML5 element inside another element is a ________ of the containing element.
child
Which of these is the method of the window object that stops repetitive calls to a method?
clearInterval
The sort method can be given a function to use for the comparisons it makes, called a(n) ________ function.
comparator
The fifth link on a page can be accessed using ______.
either of the 2 link answers
The style of programming in which the user interacts with a GUI component is called ________ programming.
event-driven
Which of the following will not evaluate to true?
false || false
A ________ is a group of characters or bytes that conveys meaning.
field
The ________ element provides a caption for the image in the figure element.
figcaption
The ________ element describes an image in the document so that it could be moved to the side of the page or to another page.
figure
The ______ method allows access to an individual element in a collection.
item
Each list item in an unordered list is delineated by the ________ element.
li
A link to an e-mail address is created using the notation <a href = "________">Paul</a>.
mailto:emailAddress
Function getElementById returns a(n)
object
Web-based applications are often multitier applications, sometimes referred to as ________ applications.
n-tier
In the following line the word document is a(n) ______ that resides in the computer's memory. document.writeln("Hello World");
object
The ________ is the distance between the content inside an element and the inside of its border.
padding
The ________ attribute allows you to put temporary text in a text field.
placeholder
One major use for the meta element is related to which of the following?
search engines
Which of the following is not a method or property of the JavaScript Number object?
toFloat
Which of the following is not a method of the JavaScript Boolean object?
toInt
An HTML5 table contains rows delimited by ________ elements, which contain cells delimited by ________ elements.
tr, td
If the string passed to parseInt contains a floating-point numeric value, parseInt will ________.
truncate the floating-point part to be left with an integer value
In JavaScript, numbers and boolean values are passed to functions by ________.
value
To create an internal link in a Web page, the value of the href attribute includes the named anchor preceded by a ________.
# symbol
What would the browser display if the following code were executed in a script? var product = 0; while (product >= 25) product = 2 + product; document.writeln( product );
0
document.write( array[ i ][ j ] + " " ); document.writeln("<br />");
1 2 31 2 3
What is the value of num after the following statements are performed? num = 2.4589; num = num.toFixed( 2 );
2.46
What is the value of num assuming that all 12 elements of array test are initialized to 3? ++test[ 7 ]; var num = test[ 7 ];
4
for ( var count = 1; count <= 10; ++count ){if ( count == 5 ) break;
5
this is the answer
55
the answer is
60
while ( count <= 5 ) { total = total + 10; count = count + 1
60
In which of the following do you set the MIME type of the external style sheet?
<link></link>
An example of the proper format for inline styles is:
<p style = "font-size: 20pt">
________ allow you to specify the style of your page elements (spacing, margins, etc.) separately from the structure of your document.
Cascading Style Sheets
________ is used to specify the presentation, or styling, of elements on a web page (e.g., fonts, spacing, sizes, colors, positioning).
Cascading Style Sheets (CSS)
Which of the following statements is false?
Client-side programming technologies are used to build applications that are run on the server
________ with JavaScript can be used to validate user input, to interact with the browser, to enhance web pages, and to add client/server communication between a browser and a web server.
Client-side scripting
An Internet ________ maintains a database of hostnames and their corresponding IP addresses and performs the translations automatically.
Domain Name System (DNS) server
Each computer on the Internet has a unique ________.
IP address
________ are declared in each individual HTML5 element using the style attribute.
Inline styles
Which of the following is the most accurate statement concerning internal hyperlinks?
Internally-linked location names can be assigned to any point in an HTML5 file
The protocol for communicating over the ARPANET became known as ________.
TCP (Transmission Control Protocol)
Which statement is false?
The del element is used to delete text.
Which of the following statements is false?
Web applications can use the window object's sessionStorage property to store up to several megabytes of key/value-pair string data on the user's computer and can access that data across browsing sessions and browser tabs
Machines called ________ store HTML5 documents.
Web servers
What is the value of num after the following statement is performed? num = 2 * Math.pow( 2, 3 );
`16
Which of the following is an example of an inline element?
all of the answers are correct
In multitier applications, the ________ maintains the application's data.
bottom tier (also called the data tier or the information tier)
The middle-tier ________ processes client requests (such as requests to view a product catalog) and retrieves data from the database.
controller logic
What type of loop should be used in a script that processes test results for 150 students?
counter controlled
The two most common HTTP request types (also known as request methods) are ________ and ________.
get, post
JavaScript references the ________ object for you when you call its functions, so you don't need to use it directly.
global
Research determined that all programs could be written in terms of only three control structures. Which of the following is not one of the three control structures?
goto-less structure
The header element creates a header for the page. The header element often contains ________.
graphics
To find out when a document was last modified, use the document object's _____ property.
lastModified
Which of the following is not a DOM collection?
roots
Which of the following is not required for counter-controlled repetition?
sentinel
An HTTP request often posts data to a(n) ________ that processes the data.
server-side form handler
External style sheets are saved with the ________ extension.
.css
Which of the following is used to access members (or properties) of form elements?
.
What is the value of i after the following statements? i = 2; i--; i--;
0
var theArray = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]; modifyArray( theArray[ 3 ] ); document.write( theArray.join( " " ) ); function modifyArray( i )
1 2 3 4 5 6 7 8 9
for ( var count = 0; count < 10; ++count ){if ( count == 5 ) continue;
10
Setting the width property to 10em will create an element that has a width that is ________.
10 times larger than the font size
Which of the following is not a valid variable name?
12footage
Which of the following is not a relative-length measurement?
12pt
What does the following expression evaluate to? ( ( 3 + ( 5 + 4 ) * 7 ) + 4 ) / 5
14
What is the output of the following script? i = 16; document.write( ++i );
17
What is the result of the statement 17 % 5?
2
The latest IP standard is
Internet Protocol version 6 (IPv6)
The word sequence in the term sequence structure refers to the sequence of ________.
JavaScript instructions in a script
What would the function cube return, assuming it is called with the statement cube( 3 )? function cube( y ); { return y * y * y; }
JavaScript runtime error
for ( var i = 0; var i < 5; var i++ ) document.write( "X" );
Nothing; the script would generate an error
Which of the following is a server-side programming technology used to build web pages?
PHP
________ is an informal language that helps programmers develop algorithms.
Pseudocode
Giving a local function variable the same name as a global variable will result in which of the following?
The local variable will "hide" the global variable.
What is the result of writing the keyword var in a function parameter list?
The result would be a JavaScript runtime error.
________ wrote communication protocols to form the backbone the World Wide Web.
Tim Berners-Lee
URL is an acronym for which of the following?
Uniform Resource Locator
Which of the following is the correct abbreviation for the statement a = a * 7; ?
a *= 7;
What will variable value contain after the following code is executed? var value = new Date(); value = value.valueOf();
a large integer representing the number of milliseconds between midnight January 1, 1970 and the current date
What does the variable string contain after the following code is executed?var string = "Good luck on the test"; string =string.link("www.deitel.com");
a link to www.deitel.com with the text "Good luck on the test"
A procedure for solving a problem in terms of the actions to be executed and the order in which these actions are to be executed is called ________.
an algorithm
string = string.split( " " );
an array containing the strings "Good", "luck", "on", "the" and "test"
What should you use as a counter in counter-controlled repetition?
an integer
What is the value of s1 after the following code is executed? var s1 = "deitel and associates"; s1 = s1.slice( 6 );
and associates
Web 2.0 embraces a(n) ________—a design that encourages user interaction and community contributions.
architecture of participation
The ________ element describes content that's separate from the main content of the page and might be used or distributed elsewhere, such as a news article, forum post or blog entry.
article
The ________ element describes content that's related to the surrounding content (such as an article) but that's somewhat separate from the flow of the text.
aside
In the statement <a href = "address">, href is a(n) ________ of the a element.
attribute
If an author and a user both define absolute measurements, the CSS specification gives precedence to ________.
author styles over user styles
The ________ attribute can be used on input types to automatically fill in the user's information based on previous input.
autocomplete
The ________ attribute places the cursor in a specified text field after the browser loads and renders the page.
autofocus
When a function invokes a new copy of itself, it is called a ________.
recursive call
The smallest data item in a computer, called a ________, can assume the value 0 or the value 1.
bit
What is the default value of the display property for a div element?
block
Which of the following is not a border property?
border-shape
When using the width, height and overflow properties of an element, position can be ________.
both absolute and relative are correct
What would the function cube return, assuming it is called with the statement cube( 3 )? function cube( y );{return y * y * y;
c. JavaScript runtime error
switch statements contain ________ labels.
case
The ________ input type enables the user to enter a color.
color
are stored by the browser on the user's computer to maintain client-specific information during and between browser sessions.
cookies
When the arrow next to a summary element is clicked, the arrow points downward and reveals the content in a(n) ________ element.
details
What does the variable string contain after the following code is executed? var string = "Good luck on the test"; string = string.charAt( 3 );
d
An alert dialog displaying the text "Welcome!" is created by calling _________.
d. window.alert( "Welcome!" );
A ________ is an electronic collection of data that's organized for easy access and manipulation.
database
The ________ element provides input options for a text input element. The browser can use these options to display autocomplete options to the user.
datalist
The ________ input type enables the user to enter a date in the format yyyy-mm-dd.
date
The time element enables you to identify a ________.
date
The ________ input type enables the user to enter a date (year, month, day), time (hour, minute, second, fraction of a second) and the time zone set to UTC (Coordinated Universal Time or Universal Time, Coordinated).
datetime
The ________ input type enables the user to enter the date and time in a single control.
datetime-local
The first statement below ________ the array while the second statement ________ the array. var c; c = new Array( 12 );
declares, allocates
In a switch statement, the ________ case clause is used to process exceptional conditions and is usually listed last.
default
Which of the following flowchart symbols can represent an if statement?
diamond
Which of the following flowchart symbols indicates that a decision is to be made?
diamond
The technique of developing and maintaining a large program by constructing it from small, simple pieces is called ________.
divide and conquer
Which of the following is the proper way to dynamically access the background color?
document.body.style.backgroundColor
Which of the following statements would correctly print out the sentence "Hello World" in blue?
document.write( "<p style = \"color: blue\">");document.write( "Hello World </p>");
An object's methods are accessed by writing the name of the object immediately followed by a ________.
dot
Which of the following accurately describes the select element?
drop-down list
HTML5 text is marked up with ________, delimited by ________ that are keywords contained in pairs of ________.
elements, tags, angle brackets
Which of the following is not a JavaScript selection statement?
for...in
If you want to bypass validation, you can add the ________ attribute to input type submit.
formnovalidate
Which of the following methods would you use to convert a list of Unicode values into a string containing the corresponding characters?
fromCharCode
If the HTML5 form game has a text field named point in it, what is the proper way to set the text associated with point to 10?
game.point.value = "10"
The _____ displays the smallest heading on a web page.
h6
Which of the following statements is correct?
if ( studentGrade >= 60 )document.write( "Passed" );
When does a recursive program go into infinite recursion?
if the recursion step does not converge on the base case
The alt attribute is used in a(n) ________ element to provide an alternate ________ description for the image.
img, text
Which of the following methods would you use to search a string for a specific character?
indexOf
The ______ property refers to the text inside an element, including HTML5 tags.
innerHTML
method allows access to an individual element in a collection.
item
simplifies JavaScript programming by making it easier to manipulate a web page's elements and interact with servers in a portable manner across various web browsers.
jQuery
The ______ property contains the number of elements in a collection.
length
All variables declared in function definitions are ________.
local variables
The ________ property specifies the distance from other page elements.
margin
The ________ element enables you to highlight text.
mark
HTML (HyperText Markup Language) is a special type of computer language called a(n) ________ language designed to specify the content and structure of web pages (also called documents) in a portable manner.
markup
A ________ is an applications-development methodology in which you can rapidly develop powerful and intriguing applications by combining (often free) complementary web services and other forms of information feeds.
mashup
The ________ renders a visual representation of a measure within a range.
meter element
In the following line, the word writeln is a(n) _________ that performs a task or action in the script. document.writeln("Hello World");
method
The "prepackaged" functions that belong to JavaScript objects such as Math.pow and Math.round are often called ________.
methods
The best way to develop and maintain a large program is to construct it from small, simple pieces called ________.
modules
The ________ input type enables the user to enter a year and month in the format yyyy-mm, such as 2012-01.
month
Two important attributes of the meta element are ________, which identifies the type of meta element and ________, which provides the information search engines use to catalog pages.
name, content
The ________ element groups navigation links.
nav
In the statement node1.replaceChild( node2, node3 ) , ________ replaces ________.
node2, node3
html5 code
nothing
if ( x > 13 ) if ( y > 13 ) document.writeln( "x and y are > 13" );else document.writeln( "x is <= 13" );
nothing
Function getElementById returns a(n)________.
object
The elements in a web page are represented by a(n) ________.
object hierarchy
s1.concat( s2 ); s3 = s1;
onetwo
Which is not a valid value for the background-position property?
ontop
Which of the following is not a media type?
oral
A function's ________ are also considered to be local variables.
parameters
Which of the following sequences does not follow the rules of operator precedence? Assume that operators are evaluated in the order listed from left to right.
parentheses, subtraction, modulus
To refer to a particular location or element in the array, we specify the name of the array and the ________ of the particular element in the array.
position number
If an element's position is declared as absolute then ________ .
positioning is set according to the margins of its parent element
Specifying the order in which programming statements are to be executed is called ________.
program control
Functions that are not provided as part of the JavaScript language are called ________ functions.
programmer-defined
The ? in the URL www.google.com/search?q=deitel separates the ________ from the rest of the URL in a request.
query string
The ________ input type allows you to set a minimum and maximum and specify a value.
range
A function that calls itself either directly or indirectly through another function is called a ________ function.
recursive
In JavaScript, all objects and arrays are passed to functions by ________.
reference
Iteration uses ________ statements and recursion uses ________ statements.
repetition, selection
Whenever a value is placed in a memory location, the value________.
replaces the previous value in that location
The ________ attribute forces the user to enter a value before submitting the form.
required
If the string passed to parseInt contains text characters, parseInt will ________.
return NaN
The ________ element describes a section of a document, usually with a heading for each section.
section
Multiple CSS rule properties in style sheets are separated by a ________.
semicolon
total = total + gradeValue; grade = window.prompt( "Enter Integer Grade, -1 to Quit:" , "0" ); gradeValue = parseInt( grade );
sentinel controlled
A program in which all statements are executed one after the other in the order in which they are written exhibits ________.
sequential execution
The value a in the following statement is called the ________ and the value b is called the ________. face = Math.floor( a + Math.random() * b );
shifting value, scaling factor
Nested in the audio element are two ________ specifying the locations of the audio clip in MP3 and OGG formats, respectively.
source elements
Which of the following is not a global function?
square
Which of the following is a legal function call for the function definition provided below? function square( y ){return y * y; }
square(7+2);
Change an image's ________ attribute to change which picture it displays.
src
The location of an image is specified in the img element's _______ attribute.
src
The ________ attribute determines the increment in which the numbers in a spinner control increase or decrease.
step
Which of the following is not a method?
strike()
By default, the JavaScript sort method uses ________ to sort the array passed to it.
string comparison
Which of the following is not a JavaScript keyword?
sub
The ________ element displays a right-pointing arrow next to a summary or caption when the document is rendered in a browser.
summary
The ________ multiple-selection statement is used to handle decision making and can be used to replace multiple if and if...else statements.
switch
The ________ input type enables the user to enter a telephone number.
tel
The search input type provides a field for entering a search query and is functionally equivalent to an input of type ________.
text
HTML5 documents are edited using a(n) ________.
text editor
Style sheets use which of the following MIME types?
text/css
The word top in the term top-down stepwise refinement refers to which of the following?
the single statement that completely represents the script
Where is a table's summary displayed?
the summary is not displayed
this is the answer
the word var must be placed before thirdNumber in line 3
this is the answer
thirdNumber in line 7 must be in quotes
The ________ input type enables the user to enter an hour, minute, second and fraction of a second.
time
A document's DOM ______ represents all the nodes in a document, as well as their relationship to each other.
tree
The usage of an input element is defined by the value of its _________ attribute.
type
Which of the following is the proper method to dynamically allocate memory to an array of 100 elements?
var c = new Array( 100 );
The ________ element indicates the appropriate place to break a word when the text wraps to multiple lines.
wbr
When the user clicks a hyperlink, a ________ locates the requested web page and sends it to the user's web browser.
web server
The ________ input type enables the user to select a year and week number in the format yyyy-Wnn.
week