peperonity.net
Welcome, guest. You are not logged in.
Log in or join for free!
 
Stay logged in
Forgot login details?

Login
Stay logged in

For free!
Get started!

Guestbook


computer.knowledge.peperonity.net

Control statement

Control statement are oe two types:-
1. Cnditional checkìng statement. (2) looping statement.

1. Conditional checking statement -
if than else statement the conditional consurct in java script. Offer a simple way to make a deasion in java script will either return a ture or false depending upon how he condition evalueative. Using the if else consurect the follow of the java script programme can be altered. The if condition determined which section of the programme code will be euecuted based on wheiher the condition evaluales a true or false syntex :-
if (condition){java script code}
<html>
<head>
<title>helo</title>
<body>
<script>
a=5;
b=4;
if(a>b){document.Write("a is greater");}
</script></head></body></html>
Looping statement:"
looping refer to the ability of a block of code to repeat itself the repeation can be for a pre define number of time or it can go untill certain condition are met for this purpuse java script offer two type of loop structure
1 for loop 2 while loop
1. For loop : the for løop is the most basic type of loop and reassmble for loop in most other programmer language.
Syntex:
for (expression); conditiön;increment/decrement)
{java script code}
program: <script>
for (ì=1;1<10;1++)
{
document.Write(i+"<br>");
}
</script>

while loop:
<script>
i=1;
while(i<=10)
d.W(i+"<br>");
1=1+2;
</script>
3 Comments:
PLEASE I WANA A WEBSITE ON IT I CAN LEARNT HOW TO PROGRAM!
05.08.2013 19:01 EDT,
Nice one!
04.04.2012 05:52 EDT,


This page:




Help/FAQ | Terms | Imprint
Home People Pictures Videos Sites Blogs Chat
Top
.