JavaScript beginner tutorial 20 – while loop




In this tutorial I show you how to use the “while loop” in JavaScript.

Don’t forget to subscribe:
http://www.youtube.com/user/QuentinWatt

For collaborations and business inquiries, please contact via Channel Pages: http://ChannelPages.com/QuentinWatt Social links:
————————————————————-
Add me on twitter:

facebook group:
https://www.facebook.com/quentin.watt
————————————————————-

Original source


40 responses to “JavaScript beginner tutorial 20 – while loop”

  1. I kinda hate it when programmers and mathematicians alike use the common saying that they are lazy. Being economically efficient with your work does not make lazy, it makes you more effective, it makes you get more stuff done in less time.

  2. hey Quentin, dankie vir die tuts bra, you made my javascript a whole lot easier… can you please tell me what to do if I want to increment my counter by a different number other than 1, for 1 it's x++, what about for anything above 1?

  3. I don't quite understand why the +counter+ is necessary in the "<p>this is a "+counter+"paragraph</p>" string. Why couldn't you have just had "<p>this is a paragraph</p>"?

    EDIT: Rewatched, however I still don't understand the need to concatenate the strings. I erased the concatenation and still got the same result. I'm confused now.

    EDIT TWO: Turns out you have the counter variable used to say paragraph 1, 2, 3, etc. I'm a tard.

  4. Wow thanks a loT for this video! I am taking a JavaScript class just for fun and I never thought that I would love to code!!! This is my first coding class…
     I am married with a software computer guy who has always tell me that I would enjoy coding but I never considerate it, now I can't stop!
    I will share this video with my classmates, I am pretty sure that I will be a lot of help for them as it was for me 🙂

  5. i did the same prg but its nt running in ny browser.

    <html>
    <head>
    <title>javascript loop</tile></head>
    <script type="text/javascript">
    var i=1;
    while(i<=10)
    {
    document.write("<p>hello suraj"+i+"</p>");
    i++;
    }
    </script>
    <body>
    </body>
    </html>

Leave a Reply