Unit 5 Question Bank

This page includes several sample questions that could be used for assessment of students' understanding of the material covered in Unit 5. Questions are organized by module. Questions are coded in fully accessible, standards-compliant HTML and could easily be plugged into an HTML form that students could take online. However, this page itself is not a functional quiz. Use the Options below to display the questions how you need them before printing or copying.

Options

Module 1

Question 1

What determines whether a script is client-side or server-side is—
Correct answer: c. whether the code is executed within the user’s web browser or on a web server.

Question 2

For client-side scripting, JavaScript is generally used rather than VBScript because—
Correct answer: b. VBScript was developed for Microsoft and competing browsers (Firefox for example) do not support it.

Question 3

Scripted content should be a bonus for users who can access it, but if users can't access it, they should still be able to access the core content of the web page.
Correct answer: a. True

Question 4

Server-side scripts—
Correct answer: d. All of the above

Question 5

Web pages that store information about you and retrieve it once you log in use a combination of—
Correct answer: a. a database and a sever-side script

Question 6

Content management systems require web authors to have a great deal of coding knowledge.
Correct answer: b. False

Module 2

Question 1

Most programming or scripting languages have a lot in common. The greatest difference is in the subtlety of their—
Correct answer: c. syntax

Question 2

JavaScript functions are called in response to—
Correct answer: a. events

Question 3

Programming languages are tolerant of mistakes. In other words, most mistakes in punctuation or capitalization will not cause a problem.
Correct answer: a. True

Question 4

A variable in a programming or scripting language is a symbolic name that represents—
Correct answer: a. a value

Question 5

Which of the following is a common bug in programming?
Correct answer: d. All of the above

Question 6

When using the alert() function to debug JavaScript code, remember—
Correct answer: c. use them sparingly and remove them when you are done.

Question 7

An advantage to using a browser tool to debug is that it will—
Correct answer: d. All of the above

Question 8

Assigning an id attribute to an HTML element enables you to—
Correct answer: d. All of the above

Question 9

JavaScript is an OOP language. The acronym OOP stands for the following:
Correct answer: b. Object-oriented programming

Question 10

The Document Object Model (DOM) is—
Correct answer: d. Both a and b

Question 11

Once you have created a JavaScript function, you need to call it to make it work. If you wish to have the script run automatically when visitors first visit your page, you should call it using which event?
Correct answer: c. onload

Question 12

If you're searching for built-in objects, or if you're wondering how you would know what properties or methods are available for a particular object, you can get answers to these questions by consulting a Javascript or DOM reference guide.
Correct answer: a. True

Question 13

A typical lifecycle for a software product consists of the following phases, in chronological order:
Correct answer: b. design, development, testing, release

Question 14

A common feature of programming languages that allows your script to perform a logic process is—
Correct answer: c. if/then/else loops

Question 15

If you use JavaScript to create a digital clock that is displayed on a web page, you can change the appearance of that clock using—
Correct answer: b. CSS

Question 16

If you want to make an HTML element visible only if the user specifically requests it (that is, triggered by a user-generated event), how could do that using JavaScript?
Correct answer: a. Change the CSS property display from "none" to "block"