| About Us | Contact Us | Privacy Policy | Join Us+ |

WorldTrueSight

Get the latest news and reviews about technology!

19 Sep 2019

Fibonacci Series Using JavaScript

What is Fibonacci Series?

Fibonacci Series is a series of numbers where the first two Fibonacci numbers are 0 and 1, and each subsequent number is the sum of the previous two. 

For Example:

0
1
1
2
3
5
8
13
and so on ...

JavaScript Code:

Fibonacci Series JavaScript

  • In JavaScript, Variable declaration is done by using var keyword, followed by variable name.
  • In JavaScript, document.write is the output statement.
  • In JavaScript, prompt is used to get the input from the user.
  • In JavaScript, function FuncName() {  } is used for creating a function.

No comments:

Post a Comment