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  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    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

    - Detect Browser Compatibility with the Reques...
    - Using the EXT JS Date Picker Widget
    - Ajax Hack for Entering Information Without R...
    - EXT JS 2.1 Overview
    - Using the Style Object for Zebra Tables with...
    - Binary Searching
    - An Improved Approach to Building Zebra Tables
    - Assigning Background Colors Dynamically to Z...
    - Building Zebra Tables with CSS and JavaScript
    - JavaScript: Array Objects
    - A Closer Look at Smart Markers with Yahoo! M...
    - Using Polylines and Smart Markers with Yahoo...
    - Bulleted Menu of Links
    - Creating Click Loggers and Basic Markers wit...
    - Adding Pan Controls to Yahoo! Maps







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway