JavaScript
  Home arrow JavaScript arrow The Power of Javascript: Basic Concepts
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

The Power of Javascript: Basic Concepts
By: Michael Youssef
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 18
    2005-07-05

    Table of Contents:
  • The Power of Javascript: Basic Concepts
  • Javascript Comments
  • Javascript Statements
  • Keywords
  • Identifiers
  • White Spaces and Case Sensitivity

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    The Power of Javascript: Basic Concepts


    (Page 1 of 6 )

    The best way to learn any programming language is by practice. Javascript is not an exception to this rule, so we will introduce a lot of code in the articles of this series. In this article, you will be introduced to the very basic concepts of the Javascript language. We discuss comments, keywords, identifiers, statements and the semicolon, case sensitivity and white spaces. Note that our examples at this time are limited and we will focus more on the concepts, but after a few articles we are going to discuss many examples on each concept.

    To make the concepts easier for you to grasp we will have only one example for this article to explain the concepts we need to discuss. So let's take a look at our simple example.

    The Example

    This example is very simple, it adds two numbers and writes the total to the Web page. Let's take a look at the code.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Hello World</title>
    <script language="JavaScript" type="text/javascript">
    // This script is used to explain the concepts of
    /* Comments, Keywords, Identifiers,
    Case Sensitivity, Whitespaces and statements*/

    // the firstValue is a location in memory that
    // stores the value 10
    var firstValue = 10;
    var secondValue = 23; // the secondValue is another location in memory that stores the value 23
    // result is a location in memory that
    // stores the total value of adding firstValue and secondValue
    var result = firstValue + secondValue;
    // the next line writes some text to the web page
    document.write("The total of adding firstValue and secondValue = ");
    // the next line writes the value of the result memory location
    document.write(result);
    </script>
    </head>
    <body>

    </body>
    </html>

    Save the file and load it into your browser. You will get only one line written to the Web page:

    This code example contains everything we need to explain for this article, so let's begin.

    More JavaScript Articles
    More By Michael Youssef


     

    JAVASCRIPT ARTICLES

    - Building Dynamic Shadows with JavaScript and...
    - Active Client Pages: Chrys`s Approach
    - The Script Approach to Active Client Pages: ...
    - Principles of Active Client Pages: the Scrip...
    - Active Client Pages: the Script Approach
    - Building an RTF-capable Form with the Ext JS...
    - Creating a Multi-Tabbed Online Form with the...
    - jQuery Overview
    - Constructing a Multi-Column Online Form with...
    - Grouping Field Sets on Dynamic Web Forms wit...
    - Building Dynamic Web Forms with the Ext JS F...
    - More on JavaScript Array Objects
    - Methods of the DOM Location Object
    - The DOM Location Object Properties
    - Handling Remote Files with JavaScript Click ...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT