CODE
The Hidden Language of Computer Hardware and Software
2nd Edition

Chapter 27. Coding: JavaScript

Chapter 27 is about writing computer programs, an activity variously known as software engineering, programming, or coding.

Two types of coding are described in this chapter: on a separate webpage, assembly language programming based on the the Intel 8080 processor; and on this page, high-level webpage programming using JavaScript.

Examples of JavaScript Programming

Each page in this list is an HTML file with a complete JavaScript program, arranged to present some features of JavaScript and common techniques.

This is nowhere close to a complete tutorial; it's just intended to get you started. Many other resources such as books and websites are available to increase your knowledge and improve your programming skills:

The HTML and JavaScript on each of the following pages has been extensively documented with comments. You can examine the page by viewing the page source. Using Google Chrome or Microsoft Edge on Microsoft Windows, right click the page and select View page source. In Safari, select Show Page Source from the Develop menu.

These HTML files are entirely self-contained. This is unusual. Generally, the Cascading Style Sheet (CSS) information is in a separate file with the extension .CSS, and the JavaScript is in a separate file (or files) with the extension .JS. In these pages, the CSS and JavaScript are included in the HTML page. If you want, you can save the HTML page to your computer, make changes to it, and load it into a browser to experiment.

1. Displaying Basic Information

2. Handling Events

3. Color Selector

4. Hexadecimal Calculator

5. Dot Matrix Clock

6. Draw Circles

7. Law of Cosines

8. Analog Clock

9. Fourteen-Fifteen Puzzle

10. Spin Paint

11. Lissajous Curves