Essential JavaScript

This page was developed largely based on Mozilla JavaScript Authoring Guide, and I hope they forgive me if this first version borrows from them more than it should. This page is not a comprehensive overview of JavaScript, but rather a study of the core concepts, and basic steps to let someone create client-side scripts using JavaScript. The emphasis is to cover the essential to have someone started with scripting.

Java and Java Scripts are not the same. Java Script shares most of Java's expression syntax and basic control flow constructs. JavaScript is an interpreted scripting language, while Java compiles applications in a system of classes. The following table compares and contrasts JavaScript and Java.

JavaScript Java
Interpreted (not compiled) by client. Compiled on server before execution on client.
Object-based. Code uses built-in, extensible objects, but no classes or inheritance. Object-oriented. Applets consist of object classes with inheritance.
Code integrated with, and embedded in, HTML. Applets distinct from HTML (accessed from HTML pages).
Variable data types not declared (loose typing). Variable data types must be declared (strong typing).
Dynamic binding. Object references checked at run-time. Static binding. Object references must exist at compile-time.
Secure. Cannot write to hard disk. Secure. Cannot write to hard disk.

Source: Netscape Java Script Authoring guide.

1. Using Java Script in HTML (how to include your scripts in a page).

2. Creating simple JavaScripts (the fun stuff)

3. Objects, properties and methods (the hard stuff).

Lets see this all together in this page. It contains both the example live and the code to create it.

4. A little bit of syntax . Read later, at your leisure, all the details, as you need them.

5. Learning more JavaScript (the more involved stuff)

This page is maintained by Al Bento who can be reached at This page was last updated on May 17, 2007. Although we will attempt to keep this information accurate, we can not guarantee the accuracy of the information provided.