This article constitutes section 2, part A, chapter 1 of the CIW Website design manager course briefly covers: a JavaScript Introduction.

Wikipedia provides a more detailed introduction to this web programming language.

Java v JavaScript

Introduction Javascript Introducing and Testing

I shall keep this short and sweet, the course notes provide a nice table with all the differences between Java and JavaScript, I won’t include this here. Suffice to say that Java is an object-oriented, compiled language, where JavaScript is an object-based, script language.

JavaScript was originally known as LiveScript.

Applications for JavaScript

JavaScript code may be embedded in an HTML document or it may be in a separate file which is referenced from the HTML document. The syntax for each is shown below:

<script type=”text/javascript” language=”JavaScript” src=”site.js”>

This is the code to include an external script file. In this case the file is named site.js. The main advantage of using an external file is that the code can be shared by many Web pages allowing much easier modifications in the future.



JavaScript code is placed here.
/* JavaScript comments, such as this, allow the code to be
documented */


The structure of embedded code is much the same. Note the HTML comment characters, which allow earlier browsers to skip the JavaScript code which they cannot support.

Comment Indicators

We have already looked, briefly, at comments in the code sample above. The comment in that sample is a multiple line comment indicator. A single line indicator is simply //.

// This is a single line comment

/* And this is a longer section of comment
that will span multiple lines */

It is good practice to include comments in all code that you develop, even if it is only you that will be using the code. It is surprising how quickly you forget what the code was intended to do, when you revisit it several weeks or months later.

Comments are even more important if the code is likely to be viewed by other program developers. As they will not, necessarily, know your objectives from the code itself.

Author Summation

This introduction is, as the name implies, simply an introduction to the topic. At the time, it looked to be the language of the future. But, the world of computing evolves with frightening speed and other languages soon appeared on the scene.

However, this is a language that still plays an important role in today’s technological environment. My personal choice of web programming language is PHP. I am a WordPress developer. WordPress is run on PHP. It is not essential to have PHP skills to be a WordPress publisher. But, a basic familiarity with the language will always help.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.