In Association with Amazon.in   Flipkart

Saturday, August 10, 2013

Javascript Do While Loop Example

Do While:  If the given condition is true/false Do Wile Executes at least once.

 

Example:

<body>
    <script>


    t=9;
    i=10;
    do
    {
        document.write("<br/>" + t+ " X " + i + " = " + i*t);   
        i++;
    }while(i>12);
   
    </script>
</body>



OutPut:

9 X 10 = 90



No comments:

Post a Comment


Related Posts Plugin for WordPress, Blogger...