YOU ARE HERE: HOME > WEB DESIGN ARTICLES > BEGINNERS JAVASCRIPT PART 1-A

Web Design Articles and Tutorials

Beginners JAVASCRIPT - Part 1-A

November 25th , 2003 : by Stefan Mischook

Back

Let's start with the very basics (cont.):

Like human spoken languages (ex: French, English) programming languages have rules (grammar, spelling etc) and meaning for certain special key words. In English the word 'throw' has a meaning; it means to 'toss', 'pitch', 'fling', something or someone. One such 'key word' in JavaScript is the word 'function'; this keyword tells the computer that this is the beginning of code (programming code) that does something, or in other words, takes an action. Here's a made-up example:

function: Pop up a box and say: 'What's up Jimmy! '

This made up example (not real programming!) is telling the computer to pop open a box and say: 'What's up Jimmy!'

Just for the curious, I will now show you the real way to do this with Javascript:

function popupMessage()
{
alert(“What's up Jimmy!”);
}

What they h#$% is that suppose to mean? I know that for many of you this is already freaking confusing, but hold on, it's well worth it!

Programming languages have other words (besides 'function') that have special meaning as well, special meanings that tell the computer what to do. So when you are programming, you are using special keywords to tell the computer what to do.

You use programming to write (in other words: create or build) software (ex: Mircrosoft Word, Internet Explorer and even Windows!) and software enables you to more easily control your computer.

Computers are really, really stupid. So stupid in fact that if you were talking to a computer directly, you would have to use a very simple language that is so slow to write, that it becomes very difficult to get anything done since you have to explain every single step to the computer. How simple you ask? So simple that even something like printing the letter 'A' on screen could take you days to build because of all the code you would have to write!

» Continue