1. Home
  2. Computing & Technology
  3. JavaScript

Learn Javascript

Putting it All Together

Introduction

Well, we are finally at the end of this tutorial series. No that doesn't mean that you have learned all that there is to know about programming with Javascript. In fact in this series we have barely scratched the surface.

What you have achieved by working your way through all of the tutorials in this series is that you have been introduced to all of the different aspects of the Javascript language. You should now be in a position to be able to read any Javascript that you come across and work out what each of the individual statements do. Whether you can figure out what the entire script does depends on how clearly the statements have been written.

What you need to do next is to expand on what has been covered in each tutorial and look at ways to use what you have learned to produce Javascripts that do what you want them to do.

Function Library

One thing that you can do that will help to make things easier for you as you write your Javascripts is to build up your own collection of useful functions that you can call from the code that you are writing to perform quite complex operations. Because the function is already coded and tested you know it works. Also you wont have to remember how to perform that particular task because it is already coded and all you have to do is insert one line into your code to call the function.

If you give some thought to what portions of what you are writing are useful functions that you will want to reuse and write those as separate functions then you will gradually build up a library of such functions and will be able to reuse the functions in later scripts.

You don't even need to create all of these functions for yourself. Sometimes a Javascript programmer will publish functions that they have written in a Javascript library and allow others to incorporate them into their scripts. I have produced a few functions that will get you started.

More Tutorials

This tutorial series has given a basic introduction to the Javascript programming language. It is not the only tutorial series about Javascript on this site and there are lots of others elsewhere on the web. Here is a list of some of the other tutorial series on this site that you may want to look at.

Whatever it is that you are trying to do with your program, chances are that someone else has done something similar before. If you can find a tutorial that they have written then you are three quarters of the way to being able to create your own code. Searching for a tutorial on how to do something with Javascript is always worthwhile.

Other People's Code

If you can't find a tutorial on how to do what you want you still ought to be able to find web pages where someone has either already done what you are trying to do or has done something similar.

Now I am not suggesting that you copy their code - that would be a breach of copyright. What I am suggesting is that you read their code to see how they did it. This will give you ideas on ways that it can be done. Some of what they have done will be good ideas, some will not be. If you see a good idea of how to do something then there is no reason why you can't write your own code to do the same thing as long as you don't copy their actual code. You want to copy the general way that they have achieved just that small part of the functionality that you are trying to figure out using your own code so that you are copying just a general concept and not actual code.

Javascript References

To be able to make full use of Javascript you need to know all of the properties and methods belonging to each predefined class and object, you need to know all of the commands that are available and what they do, and so on. Of course almost no one has memorised that much information about Javascript. Instead we use reference works to look up those more obscure things that we don't use every day.

Reference material comes in several forms. You can buy a Javascript reference book (which is a lot different from a book designed to teach you Javascript). There are also web sites that have reference materials on them that you will probably want to bookmark.

Conclusion

You have taken your first steps on the road of Javascript programming. It is a log road and you are just starting out but you are not alone. There are a lot of us walking this same road and many of us are quite willing to share what we have learned along the way with those who haven't travelled as far.

Enjoy!

Past Lessons

  1. Introduction
  2. Decision Making
  3. Functions
  4. Maintain and Test
  5. External Script and Noscript
  6. Object Oriented Javascript
  7. Loops
  8. More Predefined Classes
  9. Document Object Model
  10. Event Handlers
  11. More Event Handlers
Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.