0% found this document useful (0 votes)
93 views

JSReview Chapter01

This document contains a test review with multiple choice, true/false, completion, and short answer questions about Chapter 1 of the textbook "JavaScript 6e". The questions cover introductory JavaScript topics like the relationship between JavaScript and the web, client-side vs server-side scripting, JavaScript objects and events, and basic syntax like variables, operators, and methods.

Uploaded by

Steve
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views

JSReview Chapter01

This document contains a test review with multiple choice, true/false, completion, and short answer questions about Chapter 1 of the textbook "JavaScript 6e". The questions cover introductory JavaScript topics like the relationship between JavaScript and the web, client-side vs server-side scripting, JavaScript objects and events, and basic syntax like variables, operators, and methods.

Uploaded by

Steve
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 5

JavaScript 6e – Test Review Questions

Chapter 1: Introduction to JavaScript

True / False

1. Although JavaScript is considered a programming language, it is also a critical part of web


page design and authoring.
a. True
b. False
REFERENCES: 2

2. Like HTML, XHTML is not case sensitive.


a. True
b. False
REFERENCES: 7

3. You can place script elements in either the document head or in the document body.
a. True
b. False
REFERENCES: 46

4. JavaScript code is always stored in an external file separate from the HTML or XHTML code
for a web document.
a. True
b. False
REFERENCES: 47

5. Elements that do not require a closing tag are called empty elements.
a. True
b. False
REFERENCES: 6

Multiple Choice
6. ____ can turn static documents into applications such as games or calculators.
a. HTML b. XHTML
c. JavaScript d. Cascading Style Sheets
REFERENCES: 2

7. ____ was established in 1994 at MIT to oversee the development of web technology
standards.
a. The University of Illinois b. The W3C
c. Microsof d. Netscape
REFERENCES: 4

Page 1 of 5
8. An HTML document is a text document that contains codes called ____.
a. elements b. tags
c. styles d. rules
REFERENCES: 5

9. In the client/server system, one of the primary roles of the client, or front end, is to ____.
a. carry out complex data processing b. provide for data storage
c. send email d. present an interface to the user
REFERENCES: 16

10. A system consisting of a client and a server is known as a ____ system.


a. traditional b. three-tier
c. monolithic d. two-tier
REFERENCES: 16

11. On client/server systems, heavy processing, such as calculations, usually takes place on the
____.
a. client b. server
c. middle-ware d. browser
REFERENCES: 17

12. A three-tier, or multitier, client/server system consists of three distinct pieces: These are
____.
a. the client tier, the processing tier, and the data storage tier
b. the client tier, the design tier, and the processing tier
c. the storage tier, the distributing tier, and the processing tier
d. the email tier, the messaging tier, and the data storage tier
REFERENCES: 17-18

13. Some of the more popular server-side scripting languages include ____.
a. C, C++, and CGI b. JScript, Livescript, and ECMAScript
c. PHP, ASP.NET, and Python d. VBS and JScript
REFERENCES: 21

14. ____ refers to programming using a scripting language that is executed from a web server.
a. Host-side scripting b. Client-side scripting
c. Servlet-side scripting d. Server-side scripting
REFERENCES: 21

15. When a client requests a server-side script, a client will never see the server-side script,
only the ____ that the web server sofware returns from the script.

Page 2 of 5
a. email sent b. program executing
c. HTML d. raw data requested
REFERENCES: 22

16. An object is ____ that can be treated as an individual unit or component.


a. state and contents b. file and data
c. formatting and color d. programming code and data
REFERENCES: 26

17. The procedures associated with an object are called ____.


a. methods b. processes
c. attributes d. functions
REFERENCES: 26

18. ____ are lines of code that are not processed by browsers, which you use to add notes
about your code.
a. methods b. comments
c. variables d. properties
REFERENCES: 31

19. A(n) ____ comment occupies only a single line or part of a line.
a. variable b. element
c. line d. block
REFERENCES: 31

20. A(n) ____ comment hides multiple lines of code.


a. variable b. element
c. line d. block
REFERENCES: 31

21. Which keyword do you use to create a variable?


a. for b. value
c. assign d. var
REFERENCES: 34

22. Variables and literals contained in an expression are known as ____.


a. operators
b. operands
c. events
d. properties
REFERENCES: 39

23. Symbols such as + and * used in expressions to manipulate operands are known as ____.
a. operators b. variables

Page 3 of 5
c. events d. properties
REFERENCES: 39

24. Which method do you use to reference an element on a web page in a script?
a. write() b. alert()
c. onclick() d. getElementById()
REFERENCES: 43

25. Which method displays a dialog box with an OK button?


a. write() b. alert()
c. onclick() d. getElementById()
REFERENCES: 41

26. Special words that are part of the JavaScript language syntax and that can't be used as
variable names are known as ____.
a. identifiers b. reserved words
c. operands d. operators
REFERENCES: 33

Completion

27. A document on the web is called a web page and is identified by a unique address called
the _________________________.
REFERENCES: 3

28. When you assign a value to a variable, you use an equal sign, which is also called a(n)
__________ operator.
REFERENCES: 35

29. When an event occurs, your script executes any code that responds to that specific event
on that specific element. This code is known as the __________.
REFERENCES: 41

30. JavaScript source files that store especially useful generic scripts used on many different
website are known as __________.
REFERENCES: 50

31. A(n) _____ is a specific circumstance that is monitored by JavaScript and that your script
can respond to in some way.
REFERENCES: 39-40

Subjective Short Answer

32. What is client-side scripting, and how is it related to the JavaScript language?

Page 4 of 5
REFERENCES: 19

33. Under what circumstances would you use server-side scripting?


REFERENCES: 22-23

34. What are the components that make up a JavaScript object?


REFERENCES: 26

35. Discuss case sensitivity in JavaScript.


REFERENCES: 30-31

36. Describe how events are useful in JavaScript code.


REFERENCES: 39-40

37. Describe why it's important to validate web documents, and how to do it.
REFERENCES: 52

38. Where does a script element usually go in an HTML document, and why?
REFERENCES: 46

39. Explain what a library is and what it is used for, and name one commonly used library.
REFERENCES: 50

40. What does each of the following statements do?


document.write("Plant choices");
window.alert("Plant choices");
REFERENCES: 41

41. What does the following code do?


var fname = document.getElementById("firstName");
REFERENCES: 43

Page 5 of 5

You might also like