Page 200 - Web Applications (803) Class 12
P. 200
Output of the preceding program is as follows:
Practice Question 2:
<html>
<body text="red">
<h2>Calculate Fibonacci series till a limit</h2>
<font color=blue>
<script>
var first=0;
var second=1;
var third=0;
var limit=21;
document.write(first+", "+second+", ");
while(third<limit){
third=first+second;
document.write(third+", ");
first=second;
second=third;
}
</script>
</font>
</body> </html>
Output of the preceding program is as follows:
Practice Question 3:
<html>
<body text="red">
<h2>Display series 1,4,9,16,25...... till a limit</h2>
<font color=blue>
<script>
var limit=15;
for(i=1;i<=limit;i++){
198 Touchpad Web Applications-XII

