SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Kelompok 8  Java Script : Control Statement II Oleh: Kukuh I. 5108100122 Brian M. 5108100156 Yodiar Hellian  5108100165
Chapter 8 - JavaScript: Control Statements II 1. Introduction 2. Essentials of Counter-Controlled Repetition 3.  For  Repetition Statement 4. Examples Using the  for  Statement 5.  Switch  Multiple-Selection Statement 6.  Do … while  Repetition Statement 7.  Break  and  continue  Statements 8. Labeled  break  and  continue  Statements 9. Logical Operators
1.  Introduction   ,[object Object],[object Object]
2.  Essentials of Counter-Controlled Repetition   ,[object Object],[object Object],[object Object],[object Object],[object Object]
While Counter.html
3.   for  Repetition Statement   ,[object Object],[object Object],[object Object],[object Object]
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(  &quot;<p style=amp;quot;font-size: &quot; + counter +  &quot;examp;quot;>XHTML font size &quot; +  counter +  &quot;ex</p>&quot; ); 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.
For Counter.html
4.  Examples Using the  for  Statement   ,[object Object],[object Object],[object Object],[object Object],[object Object]
Sum.html
Interest.html
5.   switch  Multiple-Selection Statement   ,[object Object],[object Object],[object Object]
SwitchTest.html
5.   switch  Multiple-Selection Statement case a case a action(s) true false . . . break case b action(s) break false false case z case z action(s) break default action(s) true true case b
6.   do … while  Repetition Statement   ,[object Object],[object Object],[object Object]
6.   do…while  Repetition Structure condition true action(s) false Fig. 9.10 do … while  repetition statement flowchart.
DoWhile.html
7.   break  and  continue  Statements   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
BreakTest.html
ContinueTest.html
8.  Labeled  break  and  continue  Statements   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
BreakLabelTest.html
ContinueLabelTest.html
9.  Logical Operators   ,[object Object],[object Object],[object Object],[object Object]
9  Logical Operators
9.  Logical Operators
LogicalOperators.html

Weitere ähnliche Inhalte

Was ist angesagt?

Control Structures in Python
Control Structures in PythonControl Structures in Python
Control Structures in PythonSumit Satam
 
C++ decision making
C++ decision makingC++ decision making
C++ decision makingZohaib Ahmed
 
Control and conditional statements
Control and conditional statementsControl and conditional statements
Control and conditional statementsrajshreemuthiah
 
Chapter 2 : Programming with Java Statements
Chapter 2 : Programming with Java StatementsChapter 2 : Programming with Java Statements
Chapter 2 : Programming with Java StatementsIt Academy
 
Conditional Loops Python
Conditional Loops PythonConditional Loops Python
Conditional Loops Pythonprimeteacher32
 
Presentation on nesting of loops
Presentation on nesting of loopsPresentation on nesting of loops
Presentation on nesting of loopsbsdeol28
 
Control structures in java
Control structures in javaControl structures in java
Control structures in javaVINOTH R
 
Loops in C Programming Language
Loops in C Programming LanguageLoops in C Programming Language
Loops in C Programming LanguageMahantesh Devoor
 
04 control structures 1
04 control structures 104 control structures 1
04 control structures 1Jomel Penalba
 
Java conditional statements
Java conditional statementsJava conditional statements
Java conditional statementsKuppusamy P
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareGagan Deep
 
Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)Muhammad Tahir Bashir
 
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested LoopLoops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested LoopPriyom Majumder
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control StructureSokngim Sa
 

Was ist angesagt? (20)

C++ chapter 4
C++ chapter 4C++ chapter 4
C++ chapter 4
 
Decision making and looping
Decision making and loopingDecision making and looping
Decision making and looping
 
Control Structures in Python
Control Structures in PythonControl Structures in Python
Control Structures in Python
 
C++ decision making
C++ decision makingC++ decision making
C++ decision making
 
TDD in Powershell
TDD in PowershellTDD in Powershell
TDD in Powershell
 
Control and conditional statements
Control and conditional statementsControl and conditional statements
Control and conditional statements
 
Chapter 2 : Programming with Java Statements
Chapter 2 : Programming with Java StatementsChapter 2 : Programming with Java Statements
Chapter 2 : Programming with Java Statements
 
Conditional Loops Python
Conditional Loops PythonConditional Loops Python
Conditional Loops Python
 
Presentation on nesting of loops
Presentation on nesting of loopsPresentation on nesting of loops
Presentation on nesting of loops
 
Control structures in java
Control structures in javaControl structures in java
Control structures in java
 
Loops in C Programming Language
Loops in C Programming LanguageLoops in C Programming Language
Loops in C Programming Language
 
04 control structures 1
04 control structures 104 control structures 1
04 control structures 1
 
Java conditional statements
Java conditional statementsJava conditional statements
Java conditional statements
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshare
 
Chap 6(decision making-looping)
Chap 6(decision making-looping)Chap 6(decision making-looping)
Chap 6(decision making-looping)
 
Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)
 
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested LoopLoops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
 
Control statements in java
Control statements in javaControl statements in java
Control statements in java
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control Structure
 
Vs c# lecture7
Vs c# lecture7Vs c# lecture7
Vs c# lecture7
 

Andere mochten auch

Large cash donors to the conservative party, by ‘donor group’ january 2001 to...
Large cash donors to the conservative party, by ‘donor group’ january 2001 to...Large cash donors to the conservative party, by ‘donor group’ january 2001 to...
Large cash donors to the conservative party, by ‘donor group’ january 2001 to...Chris Gilson
 
Web technology for library service
Web technology for library serviceWeb technology for library service
Web technology for library serviceRyan Terrenal
 
Large cash donors to the conservative party, by ‘donor group’ january 2001 to...
Large cash donors to the conservative party, by ‘donor group’ january 2001 to...Large cash donors to the conservative party, by ‘donor group’ january 2001 to...
Large cash donors to the conservative party, by ‘donor group’ january 2001 to...Chris Gilson
 
And engine
And engineAnd engine
And engineBamboo
 
LIS 549
LIS 549LIS 549
LIS 549masses
 
Parksville Pastured Products
Parksville Pastured ProductsParksville Pastured Products
Parksville Pastured ProductsYo TuT
 
Starting A Business - Organizational Forms
Starting A Business - Organizational FormsStarting A Business - Organizational Forms
Starting A Business - Organizational FormsLarry R. Cote, Jr.
 

Andere mochten auch (9)

Large cash donors to the conservative party, by ‘donor group’ january 2001 to...
Large cash donors to the conservative party, by ‘donor group’ january 2001 to...Large cash donors to the conservative party, by ‘donor group’ january 2001 to...
Large cash donors to the conservative party, by ‘donor group’ january 2001 to...
 
Web technology for library service
Web technology for library serviceWeb technology for library service
Web technology for library service
 
Large cash donors to the conservative party, by ‘donor group’ january 2001 to...
Large cash donors to the conservative party, by ‘donor group’ january 2001 to...Large cash donors to the conservative party, by ‘donor group’ january 2001 to...
Large cash donors to the conservative party, by ‘donor group’ january 2001 to...
 
And engine
And engineAnd engine
And engine
 
Monte Fuji Japon
Monte Fuji   JaponMonte Fuji   Japon
Monte Fuji Japon
 
Sistemas Distribuidos
Sistemas DistribuidosSistemas Distribuidos
Sistemas Distribuidos
 
LIS 549
LIS 549LIS 549
LIS 549
 
Parksville Pastured Products
Parksville Pastured ProductsParksville Pastured Products
Parksville Pastured Products
 
Starting A Business - Organizational Forms
Starting A Business - Organizational FormsStarting A Business - Organizational Forms
Starting A Business - Organizational Forms
 

Ähnlich wie JavaScript Control Statements Chapter

C# language basics (Visual Studio)
C# language basics (Visual Studio) C# language basics (Visual Studio)
C# language basics (Visual Studio) rnkhan
 
C# language basics (Visual studio)
C# language basics (Visual studio)C# language basics (Visual studio)
C# language basics (Visual studio)rnkhan
 
Android Application Development - Level 3
Android Application Development - Level 3Android Application Development - Level 3
Android Application Development - Level 3Isham Rashik
 
Chapter 3 - Flow of Control Part II.pdf
Chapter 3  - Flow of Control Part II.pdfChapter 3  - Flow of Control Part II.pdf
Chapter 3 - Flow of Control Part II.pdfKirubelWondwoson1
 
Decision making and loop in C#
Decision making and loop in C#Decision making and loop in C#
Decision making and loop in C#Prasanna Kumar SM
 
Csphtp1 05
Csphtp1 05Csphtp1 05
Csphtp1 05HUST
 
Mockito with a hint of PowerMock
Mockito with a hint of PowerMockMockito with a hint of PowerMock
Mockito with a hint of PowerMockYing Zhang
 
Operators, control statements represented in java
Operators, control statements  represented in javaOperators, control statements  represented in java
Operators, control statements represented in javaTharuniDiddekunta
 
Intro To C++ - Class 12 - For, do … While
Intro To C++ - Class 12 - For, do … WhileIntro To C++ - Class 12 - For, do … While
Intro To C++ - Class 12 - For, do … WhileBlue Elephant Consulting
 

Ähnlich wie JavaScript Control Statements Chapter (20)

Ch05
Ch05Ch05
Ch05
 
Programming in Arduino (Part 2)
Programming in Arduino  (Part 2)Programming in Arduino  (Part 2)
Programming in Arduino (Part 2)
 
C# language basics (Visual Studio)
C# language basics (Visual Studio) C# language basics (Visual Studio)
C# language basics (Visual Studio)
 
C# language basics (Visual studio)
C# language basics (Visual studio)C# language basics (Visual studio)
C# language basics (Visual studio)
 
Janakiram web
Janakiram webJanakiram web
Janakiram web
 
Android Application Development - Level 3
Android Application Development - Level 3Android Application Development - Level 3
Android Application Development - Level 3
 
Chapter 3 - Flow of Control Part II.pdf
Chapter 3  - Flow of Control Part II.pdfChapter 3  - Flow of Control Part II.pdf
Chapter 3 - Flow of Control Part II.pdf
 
Decision making and loop in C#
Decision making and loop in C#Decision making and loop in C#
Decision making and loop in C#
 
Md04 flow control
Md04 flow controlMd04 flow control
Md04 flow control
 
Model and Design
Model and Design Model and Design
Model and Design
 
Lab5
Lab5Lab5
Lab5
 
Csphtp1 05
Csphtp1 05Csphtp1 05
Csphtp1 05
 
Loops and iteration.docx
Loops and iteration.docxLoops and iteration.docx
Loops and iteration.docx
 
Ppt on java basics1
Ppt on java basics1Ppt on java basics1
Ppt on java basics1
 
Chap05
Chap05Chap05
Chap05
 
Mockito with a hint of PowerMock
Mockito with a hint of PowerMockMockito with a hint of PowerMock
Mockito with a hint of PowerMock
 
Operators, control statements represented in java
Operators, control statements  represented in javaOperators, control statements  represented in java
Operators, control statements represented in java
 
Intro To C++ - Class 12 - For, do … While
Intro To C++ - Class 12 - For, do … WhileIntro To C++ - Class 12 - For, do … While
Intro To C++ - Class 12 - For, do … While
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Switch case and looping jam
Switch case and looping jamSwitch case and looping jam
Switch case and looping jam
 

Kürzlich hochgeladen

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Kürzlich hochgeladen (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

JavaScript Control Statements Chapter

  • 1. Kelompok 8 Java Script : Control Statement II Oleh: Kukuh I. 5108100122 Brian M. 5108100156 Yodiar Hellian 5108100165
  • 2. Chapter 8 - JavaScript: Control Statements II 1. Introduction 2. Essentials of Counter-Controlled Repetition 3. For Repetition Statement 4. Examples Using the for Statement 5. Switch Multiple-Selection Statement 6. Do … while Repetition Statement 7. Break and continue Statements 8. Labeled break and continue Statements 9. Logical Operators
  • 3.
  • 4.
  • 6.
  • 7. 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
  • 8. 3.   for Repetition Statement counter <= 7 document.writeln( &quot;<p style=amp;quot;font-size: &quot; + counter + &quot;examp;quot;>XHTML font size &quot; + counter + &quot;ex</p>&quot; ); 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.
  • 10.
  • 13.
  • 15. 5.   switch Multiple-Selection Statement case a case a action(s) true false . . . break case b action(s) break false false case z case z action(s) break default action(s) true true case b
  • 16.
  • 17. 6.   do…while Repetition Structure condition true action(s) false Fig. 9.10 do … while repetition statement flowchart.
  • 19.
  • 22.
  • 25.