HTML and JavaScript BASICS 4th Edition Barksdale Test Bank - Quickly Download And Experience The Full Content
HTML and JavaScript BASICS 4th Edition Barksdale Test Bank - Quickly Download And Experience The Full Content
https://testbankdeal.com/product/new-perspectives-on-html-css-and-xml-
comprehensive-4th-edition-carey-test-bank/
https://testbankdeal.com/product/basics-of-social-research-
canadian-4th-edition-neuman-test-bank/
https://testbankdeal.com/product/new-perspectives-on-html-and-css-
comprehensive-6th-edition-carey-test-bank/
https://testbankdeal.com/product/macroeconomics-6th-edition-blanchard-
solutions-manual/
Medical Terminology A Programmed Approach 2nd Edition
Bostwick Solutions Manual
https://testbankdeal.com/product/medical-terminology-a-programmed-
approach-2nd-edition-bostwick-solutions-manual/
https://testbankdeal.com/product/elements-of-physical-chemistry-7th-
edition-smith-solutions-manual/
https://testbankdeal.com/product/advanced-financial-accounting-11th-
edition-christensen-test-bank/
https://testbankdeal.com/product/essentials-of-ecology-4th-edition-
begon-test-bank/
https://testbankdeal.com/product/laboratory-manual-for-general-
organic-and-biological-chemistry-3rd-edition-timberlake-solutions-
manual/
CFIN 4 4th Edition Besley Solutions Manual
https://testbankdeal.com/product/cfin-4-4th-edition-besley-solutions-
manual/
Lesson 6: Introducing JavaScript
TRUE/FALSE
1. JavaScript is undoubtedly the most widely used technology on the World Wide Web.
4. In JavaScript, the opening curly brace ( { ) indicates the beginning of a statement block, and the
closing brace ( } ) marks the end of that block.
5. If you make the mistake of entering HTML tags within a JavaScript code block, your browser will still
display them without error.
6. It would be easier to enter the code that can display simple static text messages in a browser using
HTML than to use the JavaScript document.write() method to display the same text messages.
7. If using the else keyword in a JavaScript if statement, the else keyword appears immediately after the
statement block of the if clause and is accompanied by a statement block of its own.
8. HTML tags do not conform to the rules of JavaScript syntax; therefore, the JavaScript interpreter
cannot process them.
9. Once the condition has been evaluated, either the if statement block or the else statement block will be
executed, or both.
10. Strictly speaking, the rules of JavaScript syntax require a semicolon at the end of each line.
MODIFIED TRUE/FALSE
1. It is easy for a Web browser to detect whether a particular Web page contains embedded JavaScript
code. The person who creates the document should use the <string> tag to mark the beginning of a
JavaScript section. ____________________
ANS: F
script
<script>
2. Method names are always followed by a parameter list, even though the list is sometimes empty.
____________________
3. The syntax of the conditional statement in JavaScript is very important. The statement begins with the
keyword if, and then a condition is specified within a pair of parentheses. ____________________
4. A JavaScript condition will always consist of two statements separated by a relational operator.
____________________
ANS: F, tokens
5. If the result of the condition is true, the else block will run. ____________________
ANS: F, if
MULTIPLE CHOICE
1. JavaScript is sometimes referred to as a programming language, but it is more accurate to call it a ____
language.
a. scripting c. sequence
b. helper d. process
ANS: A PTS: 1 REF: 142
3. When working with a compiler, the ____ controls the conversion process of turning human-readable
code into a machine-readable form.
a. browser c. source program
b. programmer d. target program
ANS: B PTS: 1 REF: 142
4. With JavaScript, the browser will convert the script into its equivalent machine-readable form called
____ code.
a. primary c. binary
b. secondary d. sequential
ANS: C PTS: 1 REF: 142
5. The primary purpose of JavaScript is to generate text that will be inserted into the standard ____ text
stream.
a. HTTP c. FTP
b. HTML d. TCP/IP
ANS: B PTS: 1 REF: 142
6. The syntax of the parameter list consists of an opening parenthesis, ____ or more parameter items, and
a closing parenthesis.
a. zero c. two
b. one d. three
ANS: A PTS: 1 REF: 143
7. The JavaScript method ____ simply inserts a string of characters into the standard HTML text stream.
a. document.write() c. document.stream()
b. document.text() d. document.window()
ANS: A PTS: 1 REF: 144
8. When working with JavaScript, always place the ____ directly below the keyword to which it belongs.
a. opening brace c. property name
b. closing brace d. method name
ANS: A PTS: 1 REF: 145
9. When working with JavaScript, always ____ contained within the statement block.
a. highlight comments c. italicize the HTML
b. capitalize tags d. indent the statements
ANS: D PTS: 1 REF: 145
10. When working with JavaScript, always place the closing brace so that it is ____ with its corresponding
opening brace.
a. horizontally aligned c. centered
b. vertically aligned d. right justified
ANS: B PTS: 1 REF: 145
13. The JavaScript if statement supports an optional ____ clause, which defines the action to take if the
specified condition is not true.
a. when c. yet
b. else d. then
ANS: B PTS: 1 REF: 148
14. The purpose of the ____ method is to allow a JavaScript program to display a special dialog box that
will notify the user that an unexpected event has occurred or that some kind of user input is required.
a. notice() c. alert()
b. message() d. warning()
ANS: C PTS: 1 REF: 152
15. ____ is considered to be the JavaScript default object, which means it is not necessary to use its name
explicitly.
a. Script c. Name
b. Value d. Window
ANS: D PTS: 1 REF: 152
16. JavaScript objects contain ____ that programmers can access to obtain information about the object.
a. properties c. lists
b. methods d. syntax strings
ANS: A PTS: 1 REF: 151
17. The bar at the bottom of the browser window that displays messages is called the ____ line.
a. status c. alert
b. help d. command
ANS: A PTS: 1 REF: 156
18. In 1978, two employees of Bell Laboratories, Brian Kernighan and Dennis Ritchie, published a book
titled The C Programming Language, and started the tradition to display the phrase ____.
a. “Hello, World!” c. “Hello, Friend!”
b. “Hello, USA!” d. “Hello Out There!”
ANS: A PTS: 1 REF: 159
FIGURE 6-1
19. Referring to Figure 6-1, the table shows ____ operators.
a. process c. absolute
b. relational d. standard
ANS: B PTS: 1 REF: 148
20. Referring to Figure 6-1 above, the operators shown in the chart are often part of a JavaScript ____.
a. method c. parameter list
b. property d. condition
ANS: D PTS: 1 REF: 148
Case 6-1
Kate is new at her company, and has found some existing JavaScript that she would like to use on the
company’s Web site.
21. In the JavaScript below, Kate realizes that the first line “if (<blank>)” is called the ____.
if (<blank>)
{
input 1;
input 2;
input 3;
}
a. link c. clause
b. condition d. operator
ANS: B PTS: 1 REF: 147 TOP: Critical Thinking
22. In the JavaScript below, Kate discovers that the lines labeled “input 1; input 2; and input 3;” are called
the ____.
if (<blank>)
{
input 1;
input 2;
input 3;
}
a. variables c. constants
b. statements d. operators
ANS: B PTS: 1 REF: 147 TOP: Critical Thinking
Case 6-2
Daniel is writing JavaScript code to see if the person visiting his Web site is using Microsoft Internet
Explorer.
23. The condition being evaluated in this JavaScript code fragment from Daniel’s site is:
In this case, you are utilizing the appName ____ of the navigator object to determine the application
name of the current Web browser.
a. method c. object
b. application d. property
ANS: D PTS: 1 REF: 151 TOP: Critical Thinking
24. In the context of this case, and the code written below,
the term navigator can be used interchangeably with the term ____.
a. browser c. appName
b. Microsoft Internet Explorer d. Name
ANS: A PTS: 1 REF: 151 | 152 TOP: Critical Thinking
COMPLETION
1. In the context of HTML and JavaScript, a(n) ____________________ is nothing more than a sequence
of one or more characters.
ANS: string
ANS: objects
3. A(n) ____________________ is a user-defined name for a memory location whose value can change
over time.
ANS: variable
4. A token can either be a variable name (such as x or count) or a literal ____________________ (such
as 10 or “hello”).
ANS: constant
PTS: 1 REF: 148
ANS: window
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a. Methods
b. Parameter list
c. Conditional statement
d. Interpretation
e. Syntax
1. Gives programmers the ability to evaluate a specific condition and then perform different actions
depending on the results of that evaluation
2. Provides the method with the information it needs to perform its function correctly
3. JavaScript programmers call upon the services of one or more of these specialized functions that are
within objects
4. Specific rules of grammar in the Javascript language
5. The line-by-line conversion process of scripts that occurs automatically at run time
ESSAY
1. Explain the history of Java and JavaScript. Which came first? How are they related to each other?
Would you rather have worked on the development of Java or the development of JavaScript? Why?
ANS:
Java was created first by Sun Microsystems, Inc. Sun released its cross-platform programming
language to the general public in 1995, and it has grown in popularity at an unprecedented rate ever
since.
But Sun was not the only company looking for ways to enhance the capabilities of standard HTML.
Netscape Communications Corporation was also busy working on technologies to give Web
developers a way to embed user-programmable scripts into static HTML documents. They knew that
they needed to incorporate a well-defined syntax into their design. Netscape employees observed how
popular the Java language was becoming, so they licensed the Java name from Sun and used the Java
syntax in their own scripting language. The result of Netscape’s efforts became known as JavaScript,
and it has also enjoyed a great deal of success in the Internet software development sector.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
testbankdeal.com