Home arrow JavaScript arrow Page 2 - The Power of Javascript: An Introduction
JAVASCRIPT

The Power of Javascript: An Introduction


Javascript is a powerful language for Web designers to know, but there are some misconceptions about what it is and what it can do. This first article in a series covering Javascript from the basics to more advanced applications will explain what it is, what it is not, and give you a small taste of what it can do.

Author Info:
By: Michael Youssef
Rating: 4 stars4 stars4 stars4 stars4 stars / 13
June 28, 2005
TABLE OF CONTENTS:
  1. · The Power of Javascript: An Introduction
  2. · Meet Javascript
  3. · The Hello World Example
  4. · Hello World? What's going on?

print this article
SEARCH DEVARTICLES

The Power of Javascript: An Introduction - Meet Javascript
(Page 2 of 4 )

There is a big misunderstanding about the Javascript language. Some of you may think that it's a minimized version of Sun Microsystems's Java programming Language, and others think that it's a very easy to learn programming language that has been designed specifically for use in Web pages and by non-programmers (Web designers). This is very misleading information about Javascript, so let's meet Javascript.

Javascript is a scripting language, which is different from programming languages like Java, C++ or Visual Basic. After you write an application in one of those languages, you use a tool called a compiler to convert the code you have written (for example, the C++ code you have written) into an executable file (.exe file) that contains the binary data. The compiler takes the C++ code (or Java) and converts it into a binary file, which the computer understands. This process is done only one time for the program; then you can load the program into memory and work with it. This is not the case with Javascript; we don't have a Javascript compiler.

As a side note, if you don't know what a binary data file is, let's just say that computers don't understand any of the programming languages we use, like C++ or Visual Basic. Instead, they only understand 0s and 1s, because the computer's memory contains millions of electrical circuits which have two states, 1 or 0, or much more like on or off.

As we said, Javascript is a scripting language, so let's explain what this means. A scripting language doesn't use a compiler in order to execute the program code. Instead it uses a tool called an interpreter. Let's explain what happens when you want to run a Javascript program (actually we call it a script here, not a program).

You have written Javascript code and you need to execute it. You load the code into the interpreter, and it will execute the code for you (you will understand this process more when we look at the Hello World example). This happens each time you want to run the program (the script, I mean). This can be used in a wide range of applications and systems but this is not within the purview of our discussion; in this series we discuss Javascript use in browsers only.

So Java uses a compiler, while Javascript uses an interpreter to execute the code. They are both different languages and have nothing in common except for some syntax similarity. Actually, Netscape used the name Livescript, but it has been changed to Javascript (something to tell the industry that it's as interesting a language as Java, too).

I will not go into the Javascript versions and browser implementation right now (we will get into that when you get more into the Javascript code). In the coming articles we will just focus on the basics of the language and programming.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- Project Nashorn to Make Java, JavaScript Wor...
- JavaScript Virus Attacks Tumblr Blogs
- Google Releases Stable Dart Version, JavaScr...
- Khan Academy Unveils New JavaScript Learning...
- Accessing Nitro? There`s an App for That
- JQuery 2.0 Leaving Older IE Versions Behind
- Fastest JavaScript Engine Might Surprise You
- Microsoft Adjusting Chakra for IE 10
- Brendan Eich: We Don`t Need Google Native Cl...
- An Overview of JavaScript Statements
- An Overview of JavaScript Operators
- Overview of JavaScript Variables
- More of the Top jQuery Social Plugins
- The Top jQuery Social Plugins
- More of the Top jQuery Slider Plugins

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials