Introduction

Welcome to the JavaScript Interactive Tutorial (JIT). Before we proceed to the actual tutorial, here are some facts that every JavaScript programmer should know.

JavaScript is NOT Java

Though the two names may sound similar, they are not the same. Java was developed by Sun Microsystems and runs on any platform. It is not dependent on any Operating System or configuration. JavaScript on the other hand, is confined within the limits of a browser. JavaScript is coded into HTML in order to enhance the effects and to enable more user interactivity, while Java is a programming language that runs independently, somewhat like C++ and Pascal.

JavaScript is interpreted and not compiled

Unlike Java and Pascal, JavaScript is not compiled into .EXE files and run on the machine. The web browser interprets the code at the time of loading. One disadvantage of this is that the code will take longer to run, because the browser has to compile the code just before running it.

JavaScript is a loosely typed language

In other words, JavaScript is a language that does not require you to declare all variables as a certain type before using it. For example, in Visual Basic, the programmer has to type Dim xyz as Integer before being able to use it, while in JavaScript it is perfectly acceptable to just type xyz = 123 without explicitly declaring it beforehand.

JavaScript is event-driven

This means that JavaScript is a language that is used to handle user responses and the code will run when triggered by some specified event, such as a mouse cursor moving over a hyperlink. JavaScript is used to handle events in HTML, such as buttons and text fields.