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
kj2
5,933 PointsReal World Applications
Im doing the front end dev track, Im on the Javascript part, doing Arrays right now, Im learning a ton, and understanding fairly a good amount, however, I feel like Im learning definitions and what specific pieces of code does and learning the language, but Im not realizing how to use any of it in actually code, when it comes to the javascript part. I wish the videos would say " this is how you would use this in a real world project"
any advice on how to best start putting my very basic understanding of javascript to use?
thanks
2 Answers
Craig Schlegel
12,268 PointsIt seems like using arrays and classes and those kinds of things are better suited for web applications (or console based applications). The php track on treehouse has you using these things to make an online product catalog. From what I understand (I'm a beginner too), javascript is used more for adding basic interactivity to your site with things like jquery.
James Barnett
39,199 PointsThe way most people learn their first programming language is they are taught about the tools of the trade, variables, loops, arrays, data storage etc.
Once you know how to do all of that then you need a problem to solve and the most important part of the learning process begins ...
- you break your problem into (very) small steps
- order your steps
- pick the next step off the list
- look in your toolbox to see what tool you need to help you complete the step
Here's a good problem to illustrate the point ...
Say you run a database query that returns a list of dates and number of badges earned on that date.
You want to calculate how many consecutive days Treehouse user has earned a badge, you want to calculate their learning streak.
A few choice tools for this problem would be ...
- an array (to store the date and badges earned on that day)
- a loop (to loop over the array)
- a few variables (to keep track of which date you are on and number of consecutive days)
In programming there are often many ways to do something, you can do this in JavaScript or in a backend language like PHP.
James Barnett
39,199 PointsJames Barnett
39,199 PointsWhile that is the most common use case JavaScript can do a lot more. You can read about some of these use cases over on the Treehouse blog http://blog.teamtreehouse.com/learn-javascript