jquery-tutorialsmade

jQuery Script to print Fibonacci series

This is an another interesting topic for the school and college students, In this post you are going to learn how to write a jQuery script to print Fibonacci series, this kind of programs usually people write in server side or console scripts like C, JAVA, PHP, ASP, JSP etc., but I have written in jQuery, so the beginners can understand the basics of jQuery.

What you will learn from this jQuery Fibonacci script?

1. To get the value of a textbox using val() jQuery function.
2. To print the value to a HTML DIV element in jQuery using html() function.
3. To append the value to a HTML DIV using jQuery append() function.
4. While loop in jQuery (there is no difference from traditional JavaScript).
5. Adding two number in jQuery (no difference from JavaScript).
6. IF condition (same as JavaScript)

Here is the entire HTML & jQuery script:

Read the comments in the above script to understand it.

And finally as always, here is the demo:

demo

Enjoy the day. Like this website in Facebook to get updates.  Good Luck!.

Related Posts

Leave a Reply