Home arrow JavaScript arrow The Power of Javascript: Basic Concepts
JAVASCRIPT

The Power of Javascript: Basic Concepts


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.

Author Info:
By: Michael Youssef
Rating: 4 stars4 stars4 stars4 stars4 stars / 27
July 05, 2005
TABLE OF CONTENTS:
  1. · The Power of Javascript: Basic Concepts
  2. · Javascript Comments
  3. · Javascript Statements
  4. · Keywords
  5. · Identifiers
  6. · White Spaces and Case Sensitivity

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
The Power of Javascript: Basic Concepts
(Page 1 of 6 )

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.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks
- Dynamic jQuery Styling

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



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