• Saturday , 4 July 2020

JavaScript Tutorial For Beginners #16 – While Loops

Code Canyon

Yo Ninjas, in this JavaScript tutorial I’ll be introducing the concept of looping in JS. More specifically, we’ll be taking a look at the while loop – the most basic form of loops.

JavaScript loops are a way of repeating sections of code over and over, so that you’re not having to re-write code again and again manually. For as long as a specified condition is true, the loop will continue to execute your code.

Be careful not to cause an infinite loop! This can crash your computer.

As always, any questions, fire away :).

SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1

========== JavaScript for Beginners Playlist ==========

========== CSS for Beginners Playlist ==========

========== HTML for Beginners Playlist ==========

========== The Net Ninja ============

For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk

========== Social Links ==========

Twitter – @TheNetNinja – https://twitter.com/thenetninjauk

Original source

3d Ocean

Related Posts


  1. Ashwini Abhishek
    September 8, 2017 at 20:09

    can you please tell how you run the code in chrome?

  2. musicNix12345
    September 8, 2017 at 20:09

    1:22 That will crush your coumputer…so, I'll show you that in a second. 😀

    Great videos, though! Thanks!

  3. Bulkislove Bulkislife
    September 8, 2017 at 20:09

    Best videos i have found on the subject, so simple a mare child could understand and that is exactly what you want with a guide. Started my way with codeacademy which was good but i get a much better understanding in a whole with these vids, recomended for everyone that are new to javascript! Big ups to this dude!!! Sub him, he deserves more.

  4. 5-Minute Language
    September 8, 2017 at 20:09

    Great tutorial – thanks for sharing!

  5. Wingman Gaming
    September 8, 2017 at 20:09

    Northern accents are oddly appropriate for voices of authority (I'm southern).

  6. Jia Yao Lim
    September 8, 2017 at 20:09

    Great video! You explain JS so much better than my professor. Anyway minor minor error spotted: I think the very last line of code should be

    document.write("You are now at least 10 years old!");

    since 10 is not over 10 haha. Cheers from Singapore!

  7. Jakub Woźniak
    September 8, 2017 at 20:09

    I am so happy I can cry right now.
    age++, the key that I was missing.
    I never realised that with (i=0; i<10; i++)
    You can do it with other variables.
    It's so simple.

  8. Vivid
    September 8, 2017 at 20:09

    The Net Ninja what text editor you using??

  9. Genuine Luna
    September 8, 2017 at 20:09

    wow you solved my frustration! thanks! I've been stuck on the while loop for a while. great video!

  10. yayaya587584894894583
    September 8, 2017 at 20:09

    Clear and concise as always. Your videos are the best.

  11. Chris Kissoon
    September 8, 2017 at 20:09

    Hey net ninja please correct me if I'm wrong but if age is equal to 10 wouldn't the document.write message be wrong Since 10 is not less that 10

  12. Hashimov Kənan
    September 8, 2017 at 20:09

    Hi , i really like watching your videos altought my english is not good enough to understand everything ur saying. can you add subtitles in turkish? i'm pretty sure all of your turkish fans will appreciate this and you will get more view. Thank you for attendion.

  13. sdfbtnsfgd
    September 8, 2017 at 20:09

    var thx = true;

    while (thx === true && thx !== false) {
    document.write ("very helpful, best tuts thnxx");

  14. Jonthue Michel
    September 8, 2017 at 20:09

    Thanks! it really was helpful!

Leave A Comment

You must be logged in to post a comment.