Appendix

Answers to Self Tests

Chapter 1: Introduction to JavaScript

1.   C. HTML

2.   A. A Web browser

3.   C. JavaScript

4.   B. False

5.   C. ECMAScript

6.   A. True

7.   C. LiveScript

8.   A. prototype-based

9.   B. False

10.   B. It may offer features such as code highlighting, completion, debugging tools, and more.

11.   C. interpreted

12.   B. False

13.   D. The client

14.   D. It is added to an HTML document.

15.   A. <script> and </script> HTML tags

Chapter 2: Placing JavaScript in an HTML File

1.   D. All of the above

2.   B. To ensure the Web page validates when using XHTML

3.   A. Yes

4.   The noscript tag provides content for those without JavaScript.

5.   A. .js

6.   B. <script src=“yourfile.js”></script>

7.   In HTML, the script ...

Get JavaScript: A Beginner's Guide, Fifth Edition, 5th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.