JavaScript
Introduction
JavaScript is the behavior element of what is typically understood to be the three–component makeup of a Web document. (The other two being HTML for content and CSS for presentation.) Employing JavaScript into your Web pages will morph them from static documents to dynamic, event–driven, user–interactive sites. The core of the language is covered in the first half of the course, where the basics are covered exhaustively. The second half of the course uses these new building blocks to create pages with full scripting interactivity.
Prerequisite
Unlike languages like HTML and CSS, neither
of which is a procedural or OOP
language, JavaScript is a complex,
object–oriented scripting programming language
that resembles C, C++, and Java in its syntax.
(Despite the fact that the word Java
appears in
JavaScript, the two languages are entirely unrelated.)
That said, a background in computer programming is not
a prerequisite to understanding the material in this
course — a full understanding of HTML and
CSS,
however, is, since JavaScript will be used to
script the latter, and to do so we'll be embedding
JavaScript in the former.
If you don't know HTML and/or CSS, look at
the tutorials at http://www.w3schools.com.
Also, Hunter offers a six–week course in HTML and
two six–week courses in CSS.
Topics Covered
- Lexical structure
- Datatypes and values
- Variables
- Expressions and operators
- Statements
- Objects and arrays
- Functions
- Classes, constructors, and prototypes
- Modules and namespaces
- Scripting browsers windows
- Scripting documents
- CSS and dynamic HTML (DHTML)
- Scripting HTTP
- JavaScript and XML
Assignments
There will be four homework assignments—one about every three weeks to a month, with the final assignment due on the last day of class.
Development Environment
It's likely that you already have the only software you'll need to run all the scripts in this course: an up–to–date browser. In class, I'll use Firefox, Opera, Safari, Flock and Chrome to demonstrate examples, but will rely solely on Firefox as the key browser for the course.
Announcements
- None...
- so far.
Schedule
- Sundays
- 2:00 PM – 4:00 PM
- Hunter College, Room 1025 E,
695 Park Avenue
New York, NY 10065
There'll be a 15–minute break at the halfway point of each session.
Textbook
Assigned Readings
- Chapter 1. Hello JavaScript!
- pages 1 — 18
- Chapter 2. JavaScript Data Types and Variables
- pages 19 — 36
- Chapter 3. Operators and Statements
- pages 39 — 65
- Chapter 4. The JavaScript Objects
- pages 69 — 100
- Chapter 5. Functions
- pages 103 — 120
- Chapter 6. Troubleshooting, Debugging, and Cross–Browser Issues
- pages 123 — 142
- Chapter 7. Catching Events
- pages 145 — 163
- Chapter 8. Forms, Form Events, and Validation
- pages 165 — 186
- Chapter 10. Cookies and Other Client–Side Storage Techniques
- pages 221 — 231
- Chapter 14. Moving Outside the Page with Ajax
- pages 321 — 341
Homework
- Homework 1
- Due: Sunday, 16 October at 2:00 PM
- Homework 2
- Due: TBD
- Homework 3
- Due: TBD
- Homework 4
- Due: TBD
Resources
- JavaScript Tutorial (at w3schools.com)
- http://www.w3schools.com/js/default.asp
- JavaScript – MDC (home of JavaScript)
- https://developer.mozilla.org/en/javascript
- Brendan Eich at Wikipedia (JavaScript creator)
- http://en.wikipedia.org/wiki/Brendan_Eich
- Learning JavaScript (our text's Web site at O'reilly)
- http://oreilly.com/catalog/9780596521882/
Contact
Email: rvanegas at hunter dot cuny dot edu
Last modified:
![right click this image, then do a "view image" to see a slightly larger copy of this image. [An image of Shelley Powers's Learning Javascript.]](../images/learning_javascript-2nd_edition.gif)