View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
Kelompok 8 Java Script : Control Statement II Oleh: Kukuh I. 5108100122 Brian M. 5108100156 Yodiar Hellian 5108100165
Handles all the details of counter-controlled repetition
for structure header
The first line
3. for Repetition Statement for ( var counter=1 ; counter<=7 ; ++counter ) Initial value of control variable Increment control variable Control variable name Final value of control variable for which the condition is true for keyword Loop-continuation condition
3. for Repetition Statement counter <= 7 document.writeln( "<p style="font-size: " + counter + "ex">XHTML font size " + counter + "ex</p>" ); true false var counter = 1 ++counter Establish initial value of control variable. Determine if final value of control variable has been reached. Body of loop (this may be many statements) Increment the control variable. Fig. 9.4 for repetition structure flowchart.