JavaScript Tutorial For Beginners 19 - Practical Example using Loops

Published: 18 August 2015
on channel: Net Ninja
106,132
1.7k

Hey gang, in this JavaScript tutorial I just wanted to show you a quick practical example of using loops to change elements on a HTML page. In this example, we'll create an array of all the anchor tags on our HTML document, cycle through them using a for loop, and then add a dynamic class name to them dependant on their position in the page/array.

As always, fire away with any questions you have ninjas :).

SUBSCRIBE TO CHANNEL -    / @netninja  

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

   • JavaScript Tutorials for Beginners  

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

   • CSS Tutorials For Beginners  

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

   • HTML Tutorials For Beginners  

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

For more front-end development tutorials & to black-belt your coding skills, head over to -    / @netninja   or http://thenetninja.co.uk

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

Twitter - @TheNetNinja -   / thenetninjauk  


On this page of the site you can watch the video online JavaScript Tutorial For Beginners 19 - Practical Example using Loops with a duration of hours minute second in good quality, which was uploaded by the user Net Ninja 18 August 2015, share the link with friends and acquaintances, this video has already been watched 106,132 times on youtube and it was liked by 1.7 thousand viewers. Enjoy your viewing!