Introducing JavaScript

JavaScript has changed a great deal since it was first introduced but many sites still use outdated techniques. There are even lots of JavaScript tutorials on the web that show you how JavaScript should be written so that it can work in Netscape 2 rather than so that it will work in modern browsers. As a result there are many people who are writing what they think is JavaScript but where what they are producing is more suited to the 20th Century than to the 21st.

Beginners should work through all the basic examples prior to moving on to the other examples which cover separate aspects of JavaScript in more detail.

Most of the JavaScript examples here will work in IE5+, Opera7+ and all versions of Firefox, Safari and Chrome. Those commands introduced in ECMAScript 5 in 2011 are being added to the site where they are supported by the latest version of all popular browsers. Where these new commands are not supported by IE8 or IE7 that information is included in the text since those two browsers might still have to many users for you to ignore. So few people using other browsers fail to keep their browser up to date that lack of support in older versions of other browsers will not have any significant affect.

Math

This is one of the two static objects built into JavaScript. You don’t create your own objects based on the Math object, instead you simply use the properties and methods that it provides directly. A range of mathematical functions are available as methods of the Math object as well as a few numbers such as [...]

Array

This is another of the most useful built in objects in JavaScript. An array provides you with the means to group variables together in a specific order and access them by number. The JavaScript Array object also provides a selection of methods for manipulating arrays allowing you to effectively add or remove entries easily at [...]

Date

The Date object provides you with an easy way to perform all of your date processing without having to do the basic date manipulations yourself. The date object stores all dates and times in an internal format that makes adding, subtracting, and comparing easy as the methods provided for extracting the parts of the date [...]

Object

While the Boolean object is not all that useful at all the Object object is the foundation on which all of the objects in JavaScript (with the exception of the Date object) are built.

Boolean

Once you understand the basic syntax of the core JavaScript language, it is time to move on to look at various aspects of the core language in more detail. We’ll start by working our way through the various objects built into JavaScript. Some of these objects are more useful than others. A couple are static [...]

This site is © copyright Stephen Chapman - Felgall Pty Ltd 2011-2013.

You are welcome to use any the example JavaScript from this site in the scripts for your site or any that you develop for others but may not use the longer example scripts that contain a copyright notice in any other way without permission.