11th Standard Syllabus & Materials
11th Standard
TN 11th Tamil இயற்கை வேளாண்மை,சுற்றுச்சூழல் -செய்யுள் - மனோன்மணீயம் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil என்னுயிர் என்பேன் -துணைப்பாடம் - இசைத்தமிழர் இருவர் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மொழி கலை -செய்யுள் - ஒவ்வொரு புல்லையும் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - இலக்கணம் - பகுபத உறுப்புகள் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - துணைப்பாடம் - வாடிவாசல் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - செய்யுள் - குறுந்தொகை Important Questions And Answers Study Material - QB365 Set A

Published on: 12/10/2019
Control Structure in JavaScript
Download Tamil Nadu 11th Standard Computer Applications question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Applications Test

1.
Which of the following alters the execution sequence?
loop
break
default
branch
2.
In the _____ loop, body of the loop always executed at least once before the condition can be executed.
For
While
If
Do while
3.
In which loop the condition is evaluated, before executing a statement?
While
Do while
Break
Continue
4.
Which of the following is not a branching statement?
Loop
If-else
Switch
For
5.
Which part of the loop statement determines the number of times, the loop will be iterated?
First
Second
Third
Final
6.
Which conditional statement is used to transfer control from current statement to another statement?
Branching
Sequencing
Looping
Interating
7.
What is branching statement?
8.
Write the syntax of while loop
9.
Write the syntax of if statement?
10.
Differentiate the break and continue statement.
11.
Write the general syntax for switch statement
12.
List out the various branching statements in JavaScript?
13.
What are the different types of control statement used in JavaScript?
14.
What are the functions of the for loop parts?
15.
16.
Differentiate between while and do while statements
17.
18.
What is if statement and write its types?
19.
Write the output for the following program.
< Html >
< Head >
< Title > for statement< /title >
< Head >
< Body >
< script language= "java Script" type = "text / JavaScript")
var nol= prompt ("please enter table you want:", "0" );
document write ("< h2 > multiplication for your need < /h2 > ")
for (Var no2= 0; no2< =10; no2++)
{
document write (no1+ "x" + no2+ "=" + no1+no2+ "< br > );
}
< /script >
< /body >
< /Html >
20.
Write a Java Script program using while statement to display 10 numbers.
21.
Explain for loop with example.
1.
(d)
branch
2.
(d)
Do while
3.
(a)
While
4.
(a)
Loop
5.
(b)
Second
6.
(a)
Branching
7.
Branching Statements:
1. JavaScript supports branching statements which are used to perform different actions based on different conditions.
2. Branching is a transfer of control from the current statement to another statement or construct in the program unit.
3. A branch alters the execution sequence.
8.
The syntax is:
while (condition)
{
body of the loop
}
9.
if (condition)
{
True block;
}
10.
| Break Statement | Continue Statement |
| The break statement will terminate the loop irrespective of the condition. | The continue statement will skip back to the loop condition check. |
| The break statement is executed and the loop is terminated. | When the continue statement is executed, the current iteration of the enclosing loop is terminated, and the next iteration begins. |
11.
switch (expression)
{
case label 1:
statements 1;
break;
case label 2;
statements2;
break;
case labeln;
statements - N;
break;
default:
statements;
}
12.
There are different branching statements. They are :
1. if statement
2. if... else statement
3. else if statement
4. switch statement
13.
There are two types of controls :
1. Branching / Selection
2. Looping / repetitive
14.
The for structure within parenthesis there are three parts each separated by semicolon.
They are:
i) The first part of the loop initialize a variable which is also called as control variable.
ii) In most case the control variable is declared as well as initialized.
iii) The second part isthe conditional statemem that determines how many times the loop will be iterated.
iv) The third and final part determines how the value of control variable is changed (Incremented/Decremented)
15.
16.
| While Statements | Do while Statements |
| 1. First condition will be evaluated and they only based on the result of the condition the body of the loop will be executed or not. | do.... while loop body of the loop always executed atleast once before the condition can be execued. |
| 2. Entry check loop | Exit check loop. |
| 3. Checking and execution time of loop is differ in while loop. | Checking and execution time of loop is same in do while loop. |
17.
18.
The if statement is the fundamental control statement that allows JavaScript to make decisions to execute statements conditionally. This statement has two forms. The form is for only true condition.
The syntax is
if(condition)
{
True block;
}
Types of if statement:
if else statement
else if statement
nested if statement
19.
Output :

20.
<Html>
<Head>
<Title> Program-To display 10 natural number
</Title>
</Head>
<body>
<script language = "Javascript" type="text / Javascript">
document.write("<h2> The First 10 natural Number</h2>");
var n=1;
while (n<=10)
{
document.write(n+"<br">
n = n = 1;
}
</script>
</body>
</Html>
21.
The for loop is a very rigid structure that loops for a pre-set number of times. In JavaScript for structure is very flexible and is very commonly used. The syntax of the for loop looks like the following:
for(initialization; condition; increment/decrement)
{
Body of the loop;
}
The for structure consist of parts each separated by semicolon. They are,
1. The first part of the loop initialize a variable which is also called as control variable. In most case the control variable is declared as well as initialized.
2. The second part is the conditional statement that determines how many times the loop will be iterated.
3. The third and final part determines how the value of control variable is changed (Incremented/ Decremented)
Using for loop:
< Html >
< Head >
< Title > Program - To test for statement in JavaScript < /Title >
< /Head >
< Body >
< script language="javascript" type="text/javascript" >
var nol = prompt("Please enter Table You want: ", "0");
document.write ("< h2 > Multiplication Table< /h2 > ");
for(var no2=0;no2< =10;no2++)
{
document.write(nol+"x"+no2+"="+nol*no2+"< br > ");
}
< /script >
< /body >
< /Html >
11th Standard Syllabus & Materials
11th Standard
TN 11th Tamil பீடு பெற நில் - செய்யுள் - காவடிச்சிந்து Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil பீடு பெற நில் - உரைநடை - மலை இடப்பெயர்கள் : ஓர் ஆய்வு Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மாமழை போற்றுதும் - துணைப்பாடம் - யானை டாக்டர் Important Questions And Answers Study Material - QB365 Set A
NEW11th Standard
TN 11th Tamil மாமழை போற்றுதும் - செய்யுள் - ஐங்குறுநூறு Important Questions And Answers Study Material - QB365 Set A
Tamilnadu Stateboard 11th Standard Subjects

Maths

Commerce

Economics

Biology

Business Maths and Statistics

Accountancy

Computer Science

Physics

Chemistry

Maths

Biology

Economics

Physics

Chemistry

History

Business Maths and Statistics

Computer Science

Accountancy

Computer Applications

History

Computer Technology

Commerce

Computer Applications

Computer Technology

Tamil

English

French
Tamilnadu Stateboard Standards