Summary


Together, selection and repetition statements are known as control structures. JavaScript supports two selection statements and three repetition statements. The if/else selection statement is the basic decision-making statement in JavaScript. switch/case statements perform the same basic type of selection but only on lists of primitive values. The for and while loops are nearly identical in function and are used for repeating several statements many times. The for-in repetition statement is designed to loop through arrays or collections of data very efficiently. The total running time of a program can be greatly improved by decreasing the number of instructions inside a loop. There are two ways you can optimize your loops, code motion and reduction in strength.




JavaScript Professional Projects
JavaScript Professional Projects
ISBN: 1592000134
EAN: 2147483647
Year: 2002
Pages: 130
Authors: Paul Hatcher

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net