100% found this document useful (2 votes)
8 views

HTML and JavaScript BASICS 4th Edition Barksdale Test Bank download

The document provides a test bank for 'HTML and JavaScript Basics 4th Edition' by Barksdale, along with links to various other test banks and solution manuals for different editions of related textbooks. It includes a series of true/false, multiple choice, and completion questions related to JavaScript concepts, syntax, and history. Additionally, it features an essay question prompting students to discuss the relationship between Java and JavaScript.

Uploaded by

irzyk1shoubxs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
8 views

HTML and JavaScript BASICS 4th Edition Barksdale Test Bank download

The document provides a test bank for 'HTML and JavaScript Basics 4th Edition' by Barksdale, along with links to various other test banks and solution manuals for different editions of related textbooks. It includes a series of true/false, multiple choice, and completion questions related to JavaScript concepts, syntax, and history. Additionally, it features an essay question prompting students to discuss the relationship between Java and JavaScript.

Uploaded by

irzyk1shoubxs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

HTML and JavaScript BASICS 4th Edition Barksdale

Test Bank download

https://testbankfan.com/product/html-and-javascript-basics-4th-
edition-barksdale-test-bank/

Find test banks or solution manuals at testbankfan.com today!


Here are some recommended products for you. Click the link to
download, or explore more at testbankfan.com

New Perspectives on HTML CSS and XML Comprehensive 4th


Edition Carey Test Bank

https://testbankfan.com/product/new-perspectives-on-html-css-and-xml-
comprehensive-4th-edition-carey-test-bank/

Basics of Social Research Canadian 4th Edition Neuman Test


Bank

https://testbankfan.com/product/basics-of-social-research-
canadian-4th-edition-neuman-test-bank/

New Perspectives on HTML and CSS Comprehensive 6th Edition


Carey Test Bank

https://testbankfan.com/product/new-perspectives-on-html-and-css-
comprehensive-6th-edition-carey-test-bank/

New Perspectives Microsoft Office 365 and Access 2016


Intermediate 1st Edition Shellman Solutions Manual

https://testbankfan.com/product/new-perspectives-microsoft-
office-365-and-access-2016-intermediate-1st-edition-shellman-
solutions-manual/
Math in Our World 3rd Edition Sobecki Test Bank

https://testbankfan.com/product/math-in-our-world-3rd-edition-sobecki-
test-bank/

Engineering Problem Solving With C++ 4th Edition Etter


Solutions Manual

https://testbankfan.com/product/engineering-problem-solving-
with-c-4th-edition-etter-solutions-manual/

Introduction to Hospitality 6th Edition Walker Test Bank

https://testbankfan.com/product/introduction-to-hospitality-6th-
edition-walker-test-bank/

Pharmacology for Nurses A Pathophysiologic Approach 4th


Edition Adams Solutions Manual

https://testbankfan.com/product/pharmacology-for-nurses-a-
pathophysiologic-approach-4th-edition-adams-solutions-manual/

General Organic and Biochemistry 9th Edition Denniston


Solutions Manual

https://testbankfan.com/product/general-organic-and-biochemistry-9th-
edition-denniston-solutions-manual/
Understanding Biology 1st Edition Mason Solutions Manual

https://testbankfan.com/product/understanding-biology-1st-edition-
mason-solutions-manual/
Lesson 6: Introducing JavaScript

TRUE/FALSE

1. JavaScript is undoubtedly the most widely used technology on the World Wide Web.

ANS: F PTS: 1 REF: 141

2. A string is limited to 256 characters.

ANS: F PTS: 1 REF: 142

3. A meaningless sequence of gibberish or cryptic symbols can also be a string.

ANS: T PTS: 1 REF: 142

4. In JavaScript, the opening curly brace ( { ) indicates the beginning of a statement block, and the
closing brace ( } ) marks the end of that block.

ANS: T PTS: 1 REF: 145

5. If you make the mistake of entering HTML tags within a JavaScript code block, your browser will still
display them without error.

ANS: F PTS: 1 REF: 147

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.

ANS: T PTS: 1 REF: 147

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.

ANS: T PTS: 1 REF: 148

8. HTML tags do not conform to the rules of JavaScript syntax; therefore, the JavaScript interpreter
cannot process them.

ANS: T PTS: 1 REF: 147

9. Once the condition has been evaluated, either the if statement block or the else statement block will be
executed, or both.

ANS: F PTS: 1 REF: 152

10. Strictly speaking, the rules of JavaScript syntax require a semicolon at the end of each line.

ANS: F PTS: 1 REF: 152

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>

PTS: 1 REF: 142

2. Method names are always followed by a parameter list, even though the list is sometimes empty.
____________________

ANS: T PTS: 1 REF: 143

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. ____________________

ANS: T PTS: 1 REF: 147

4. A JavaScript condition will always consist of two statements separated by a relational operator.
____________________

ANS: F, tokens

PTS: 1 REF: 148

5. If the result of the condition is true, the else block will run. ____________________

ANS: F, if

PTS: 1 REF: 152

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

2. Programming languages must be converted from a human-readable form to a machine-readable form


by a specialized piece of software called a ____.
a. binary code c. compiler
b. method d. programmer
ANS: C 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

11. A keyword is recognized as part of the ____ definition.


a. language c. property
b. method d. parameter
ANS: A PTS: 1 REF: 147

12. ____ is an example of a JavaScript keyword.


a. If c. Return
b. Else d. all of the above
ANS: D PTS: 1 REF: 147

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:

(navigator.appName == “Microsoft Internet Explorer”)

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,

(navigator.appName == “Microsoft Internet Explorer”)

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

PTS: 1 REF: 142

2. JavaScript is essentially made up of a number of invisible entities called ____________________ that


contain a well-defined set of capabilities.

ANS: objects

PTS: 1 REF: 142

3. A(n) ____________________ is a user-defined name for a memory location whose value can change
over time.

ANS: variable

PTS: 1 REF: 147

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

5. The alert() method is part of an object called ____________________.

ANS: window

PTS: 1 REF: 152

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

1. ANS: C PTS: 1 REF: 147


2. ANS: B PTS: 1 REF: 143
3. ANS: A PTS: 1 REF: 142
4. ANS: E PTS: 1 REF: 142
5. ANS: D PTS: 1 REF: 142

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.

Student answers will vary and may include:


- I would prefer to have worked on developing Java. Java was first, so that may have been more
exciting to develop something brand new and oriented toward the browser.
- I would prefer to have worked on developing JavaScript. JavaScript is powerful and takes Java to the
next level. So, it is more exciting to work for the company that is using Java as a base for further
advancements.

PTS: 1 REF: 155 TOP: Critical Thinking


Random documents with unrelated
content Scribd suggests to you:
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

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.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• 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 provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

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.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

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.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

testbankfan.com

You might also like