Introduction to Javascript for Non-Nerds


So, what is Javascript anyway?
Wait, what's the difference between Java and Javascript?
So, what CAN I do with Javascript?
How is it similar to/different from other programming languages?

So, what is Javascript anyway?

Javascript is a programming language used for creating simple Internet applications on the World-Wide-Web. Why simple? Well, relative to other programming languages on the 'Net like C++ and Java, Javascript really doesn't pack a lot of power. However, if you are just beginning to get a handle of the World-Wide-Web and want to enhance your pages without having to learn too much technical stuff, Javascript is the way to go.


Wait, what's the difference between Java and Javascript?

Don't get confused between Java and Javascript. Like I mentioned above, Java is a lot more complex and as a result has more power. Javascript was intended to be a run-down version of Java that was easier to use.

For example, Javascript programs are embedded INTO your HTML files. In other words, all of your programming is done right in your HTML source file. Java, on the other hand, requires that you use something called a Compiler to convert your programming code into a separate file. So, Java programs are essentially independent of the HTML file whereas Javascript programs are always run from within a web page and don't need a compiler.

For the more advanced programmers out there, you might also be interested in knowing that variables do not need to be declared in Javascript. If you don't know what a variable is, don't panic! We'll be covering that in the tutorial as well.


So, what CAN I do with Javascript?

In general, Javascript gives you the ability to liven up your web page. Examples of what I mean include:
  • Getting input from the user and then producing output based on what the user types in
  • Creating interactive applications (i.e. a calculator)
  • Checking to see if the user has made errors in providing information to you
  • Allowing you more freedom to control the layout of your Web Page
The primary purpose of Javascript, in my opinion, is to give you more control of how your Web Page looks when someone is browsing it. The regular HTML language really doesn't allow for that interactive and dynamic nature.


How is it similar to/different from other programming languages?

If you're already familiar with other programming languages like Pascal, C, or C++, you'll notice a lot of similarities in Javascript. For the most part, Javascript resembles the C++ language. Now, that doesn't mean you have to learn C++ to learn Javascript. But those of you who do know C++ will find Javascript fairly easy to learn.

Like other langugaes, Javascript is an "object-based" programming language. In other words, Javascript controls your web page by treating elements of the web page as "objects" and uses "functions" to manipulate those objects. For example, your browser window is an object. You can use a Javascript function to print text into that window. Another example of an object would be a form that you have created that contained a text input box. You could use a Javascript function to check and see if the user had entered the right password in the input box.

The primary difference between Javascript and other programming languages is, as mentioned before, variables are global and do not need to be declared. In other words, if you didn't understand that last sentence, NO PROBLEM.


HomeGo to Top Next Page