0
2.0kviews
Write a simple JavaScript example program for Fibonacci sequence.

Mumbai University > information technology > sem 4> Web Programming

Marks: 5M

Year : Dec16

1 Answer
0
5views
<html>
<body>
<script type="text/javascript">
var a=0,b=1,c;
document.write("Fibonacci");
while (b<=10)
{
document.write(c);
document.write("<br/>");
c=a+b;
a=b;
b=c;
}
</script>
</body>
</html>
Please log in to add an answer.