Electric Type

Multimedia

About Us

News

Help

Reference   Glossary
Loop

A loop is like a JavaScript thought. Say you're a police officer usinga radar gun to catch speeding motorists. If the speed limit is 55 miles per hour, you might say to yourself: "If a car makes my radar gun display a higher value than 55, I'll pull them over, but until then I will continue to take readings. And perhaps snack on this cruller." In JavaScript, the statement of this loop would be the action (firing up your motorcycle and chasing the speeder), and the expression would be the evaluation of whether or not the passing car made your radar gun read higher than 55. This is an example of a "while" loop:

while (carSpeed < 55) {
  carSpeed = readRadar();
  // note: readRadar() should return the latest carSpeed
}

pullEmOver();  // this will only execute once carSpeed is >= 55



Tutorials  

User Blogs  

Teaching Tools  

Authoring  

Design  

Programming help  

Advanced Flash  

Javascript  

Glossary  

PHP Coding  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.