Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

JavaScript Loops, Arrays and Objects! Is this course necessary to actually make websites using JavaScript??

I know this course and JavaScript Basics are showing how to use JavaScript, but does it actually show you how to integrate JavaScript to create visuals for websites?? And is it necessary to complete a 4 hour course on something that doesn't actually help you build a website with JavaScript.

3 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Arrays and other data structures are essential to learning any programming language. I'd be hard-pressed to name a language that doesn't have them. The same goes for loops.

While you might not yet understand the significance, I can promise you that knowing this stuff will help you build a better website. One thing that springs to mind when we talk about visuals for a website and JavaScript is the animation of SVGs. Any knowledge you have of these foundations is just going to give you a larger creative canvas to work with.

For example: here's a simple codepen that I did that's a random quote generator. It also randomizes the color of the text and borders every time you get a new quote. Even doing this simple site requires that I understand key and value pairs. You're welcome to take a look. http://codepen.io/jen-nordell/pen/BjVJra

If you want to build a really basic static website (no AJAX, no API requests etc) then not really. If you want to venture in to things slightly more complex, then yes 100%. Even some user interactions require loops and arrays though so bear this in mind. For example, iterating over buttons to attach a click event handler to.

As the others said, not necessary - you can always use pre-built frameworks, libraries, plugins, etc. However, what if you needed to modify or customize a snippet of Javascript that relied on these to fit your project's needs? You might find yourself "looping" in circles. Having an understanding of the basics and how they work is very powerful ... and liberating!