JavaScript
  Home arrow JavaScript arrow Introducing JavaScript Functions and Loops
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

Introducing JavaScript Functions and Loops
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2007-11-12

    Table of Contents:
  • Introducing JavaScript Functions and Loops
  • Putting the Fun in Your Functions
  • Loops
  • While Loop

  • 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


    Introducing JavaScript Functions and Loops


    (Page 1 of 4 )

    Today, you will learn about functions from a man who can barely function, because it is 8:48 in the morning and my soda has yet to kick in. I would say wait for it, but I know you are so excited to read the rest of this article that you can't function. And if you can't function, and I can't function, how is JavaScript gonna function? Well, you'll have to keep reading to find out.

    Function Junction

    I never watched "Conjunction Junction" before, although I do remember that Bill up on Capital Hill for some reason. I was more into Reading Rainbow, Captain Kangaroo, and the Smurfs.

    Functions in JavaScript (as well as every other language) are a block of code you can use over and over again. It saves the programmer from having to code certain items throughout the program. For instance, if you play a video game and the X button makes your character do a roundhouse kick, pressing that X button triggers that function each time. Imagine playing Tekken or Street Fighter, and the poor programmer who would have to individually program each kick you did. It would take forever.

    You saw examples of functions in our previous tutorial. Now we are going to take a closer look at them and learn how to call them, or trigger them into action. So sit back, grab yourself a case of Jolt Cola, set your phone to vibrate, and let's get to work.

    More JavaScript Articles
    More By James Payne


       · Thanks for dropping by for my discussion on Javascript functions and loops. Here we...
     

    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 1 hosted by Hostway
    Stay green...Green IT