Tutorial on JavaScript

This part of my web site contains a series of lessons that I wrote to teach JavaScript. Each consists of a lesson file in Microsoft Word format (about 5 or 6 pages), a series of homework questions (again in Word format) and a web page - which duplicates the material in the Word document plus some additional material. (Well, otherwise you wouldn't have an incentive to look at the web site, would you!) The homework questions (plus - who knows? - a few more?) are also present in the form of a web page at the end of the web page for each lesson.

Unfortunately, I can't afford the space on the site to include all the Word files for the lessons and questions. You can get them, but only in the form of a Zip file. If you can't cope with Zip files, and need the raw Word files, please E-mail me.

Click here!

Lesson 1
An introduction to JavaScript and Object Oriented Programming, numeric and string variables.
Lesson 2
Converting strings to numbers, the alert() instruction, comments.
Lesson 3
if statements and switch statements.
Lesson 4
Loops: while, do-while and for, nested loops.
Assignment 1 (Based on lessons 1 to 4)
Calculating square roots and higher powered roots.
Lesson 5
One-, two- and multi-dimensional arrays. Properties and methods of arrays.
Lesson 6
Functions, parameters, passing by value, the return statement.
Lesson 7
Input controls and the concept of events.
Assignment 2 (Based on lessons 5 to 7)
A simple desktop calculator.
Lesson 8
Dates, times and timers.
Lesson 9
Programming the Browser: The images[] and links[] arrays, the location and history objects.
Lesson 10
String manipulation: Locating and extracting substrings, split(), replace(), toUpperCase(), toLowerCase(), match()
Assignment 3 (Based on lessons 8 to 10)
A probability conundrum.
Lesson 11
Regular expressions

Click here for the quickie HTML/JavaScript editor

Resources

A good place to look to find a wealth of scripts, tips, chat rooms about JavaScript etc. is ScriptSearch.com. Well worth a visit!

Here's another good one that I recommend, AllTheScripts.com. Again, it contains a large number of scripts, tutorials, hints, tips - everything you wanted to know about JavaScript but were too afraid to ask!

Another site that's worth a visit is www.codeteacher.com. My thanks to Johan Struijk for pointing this one out.

Extended Projects

These notes are not copyright and may be freely copied and changed as you think fit (except being carved into stone by one-legged Lithuanians - well, I've got to draw the line somewhere, haven't I!)


Programming Exercises       Main menu