[Home]ECMAScript programming language

HomePage | Recent Changes | Preferences

Showing revision 16
The ECMAScript programming language, commonly known as JavaScript, is an object-oriented [scripting language]? specified by the ECMA?-262 standard. [Netscape Communications]? originally developed the language under the name "LiveScript" but then renamed it to "JavaScript" and gave it a syntax closer to that of the Java programming language developed by Sun Microsystems at roughly the same time Netscape was including support for Java technology in its Netscape Navigator browser.

ECMAScript is an object-oriented scripting language that connects through interfaces called Document Object Models (DOMs) to applications, especially to the server side ([web servers]?) and the client side ([Internet browsers]?) of internet applications. Many web sites use client-side ECMAScript technology to create powerful dynamic web applications. It may use Unicode and can evalutate regular expressions and Javascript expressions contained in a string (eval function).

Environment When Javascript code is used in a HTML page it must be preceded by

<script language="JavaScript"><!--
and followed by
// --></script>

Data structures

The primary data structure is an [associative array]? similar to hashes in the Perl programming language. Strings are objects. (To do: more information on the language)

Control structures

If ... else

if (condition)
   { statements1}
[else { statements2}]

While loop

while (condition)<br> { statements}<br>

Do ... while

do
{statements}
while (condition);

For loop

 for ([initial-expression;] [condition;] [increment-expression])</br>
  {   statements}

Switch expression

 switch (expression)
 {   case label :       statement;  
     break;   
     case label :       statement;
     break; 
     ... 
     default : statement;}

User interaction

Most interaction with the user is done by using HTML forms which can be accessed from Javascript. However there are as well some very simple means of communicating with the user

External links:


HomePage | Recent Changes | Preferences
This page is read-only | View other revisions | View current revision
Edited December 17, 2001 6:54 am by Hannes Hirzel (diff)
Search: