📖 Samacheer Kalvi · 11th TN - English Medium · Computer Applications · Page 321question

CHAPTER 15 · Part 5

Chapter 9: CHAPTER 15 · Computer Applications

no2= ;no2<= ;no2++) { if(no2== ) {break;} document.write(no2+" "); } </script> </Body> </Html> Demo Program - To test Pr.. Search... C:\User\ELCOT\Desktop\SCER ^ - X Using Break Statement The continue statement will skip back to the loop condition check. When the continue statement is executed, the current iteration of the enclosing loop is terminated, and the next iteration begins.

For example, Chapter Pages for(var n= ;n<= ;n++) { if(n== ) { continue; } document.write(n+"<br>"); } In the above example, which writes out the value of n starting from , when n is equal to the continue statement is executed and the continue statement continues the loop without printing the value and the output is as follows, Illustration . Using continue statement <Html> <Head> <Title>Demo Program - To test Continue command in JavaScript </Title> </Head> <Body> <script language="javascript" type="text/javascript"> document.write("<h2> Using continue Statement </h2>"); for( var no2= ;no2<= ;no2++) { if(no2== ) {continue;} document.write(no2+" "); } </script> </Body> </Html> Demo Program - To test Pr.. Search... C:\User\ELCOT\Desktop\SCER ^ - X Using Continue Statement .

. while loop In JavaScript while loop is another most basic loop. The purpose of a while loop is to execute a statement /block of statement repeatedly as long as an expression is true. The while statement creates a loop that executes a specified statement as long as the test condition evaluates to true.

The condition is evaluated before executing the statement. Chapter Pages The syntax is: while (condition) { body of the loop } <Html> <Head> <Title>Program - To test while statement in JavaScript </Title> </Head> <Body> <script language="javascript" type="text/javascript"> document.write("<h2> Using while Statement </h2>"); var no2= ; while(no2<= ) { document.write(no2+" "); no2=no2+ ; } </script> </Body> </Html> Illustration . Using while loop Demo Program - To test Pr.. Search...

C:\User\ELCOT\Desktop\SCER ^ - X

Related topics

Have a question about this topic?

Get an AI answer grounded in your actual textbook — with the exact page reference.

Ask AI about this topic →