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
Shaun Kelly
35,560 PointsHow important is Javascript?
Hi guys! Im really struggling with learning Javascript! How important is it to learn this skill as a web developer? Are there any alternative routes? Not sure if its the tutor on treehouse that just makes it sound confusing or its just generally harder than css, html and php?
6 Answers
Dustin Matlock
33,856 PointsShaun, maybe try learning PHP first. It will give you a background in programming, and allow learning JavaScript a little easier. It's also helpful to try different resources. Learn some, take a break, let it digest, etc.
I recently purchased a JavaScript book which is very illustrative and provides a lot of examples. Also, keep an eye out for more Treehouse content in this area. I think Dave McFarland will be leading some of that. He also has a new book you might want to check out: JavaScript & jQuery: The Missing Manual, 3rd Edition.
Michael Hulet
47,913 PointsWith the advent of CSS @media queries and CSS animations and transitions, it's becoming less and less important, but to be a great web developer (especially if you're looking to do web development for a living), JavaScript is an important skill to learn. You should persevere and keep at it, as it is a nice (and oftentimes necessary) touch to websites that will really make your sites stand out. Don't worry, you'll get used to it!
Sante Kotturi
7,434 Points(Note: this is an opinion question so here's my opinion answer, its as objective as I can be subjectively be...)
I would say that JS is essential IF you want to build web apps. If you're just building websites then I guess its less important but.... ( if the difference between a webapp and website is new, I recommend: http://www.visionmobile.com/blog/2013/07/web-sites-vs-web-apps-what-the-experts-think/)
Most websites these days are almost built exclusively in Javascript with very minimal html code.
Everyone these days expects a highly responsive, highly interactive experience on the web. This was driven largely by the mobile phone revolution and native apps that run on phones. These were highly responsive/interactive and users now expect the same from their online experience.
Compared to some of the other tracks I've dabbled with, I didn't find the JS track super engaging. But, that's because its pretty much just teaching you a language, whereas the other tracks are more project based. (JS may have changed, I did it about a year ago)
I would recommend sticking with it though. If you need some motivation I would checkout backbone.js and angular.js. They're two frontend javascript "frameworks" that are pretty amazing for building webapps. You might also want to checkout SPAs (Single Page Applications) http://en.wikipedia.org/wiki/Single-page_application
If you see what's possible with javascript that might help motivate the learning :)
HTML and CSS are great for information, but if you want to create a great user experience then Javascript is necessary.
If you want another JS learning route, there are plenty out there. If you want take the plunge and like a goal-directed/project based learning curve, then I recommend the angular.js tutorials on their site. Egghead also has a good one: https://egghead.io/ as does thinkster: https://thinkster.io/angulartutorial/
Good Luck!
Dustin Matlock
33,856 PointsThere isn't a JavaScript track at this time, but there is some training in the Front End Web Development track. There has been some newer material released, and more on the way.
Sante Kotturi
7,434 PointsI should note that the extra resources I've mentioned are not designed to teach you JavaScipt, they teach you Angular.js (which kind of assumes you know a bit of JS) so they probably aren't the best recommendations but...
Inline with some of the other answers here, I would get through some treehouse javascript lessons and then maybe go peak around these frameworks like backbone & angular to see how Javascript can apply in the real-world on the cutting edge of web development. Seeing these frameworks helped motivate me to learn the parts of javascript I needed to learn (and treehouse helped a lot with that).
Dustin Matlock
33,856 PointsYou could also add Frontend Masters and Code School to the list.
Sante Kotturi
7,434 PointsDaniel Lewis , wow, I must be old :P There used to be a set of javascript videos that went over variable declarations, data types, functions etc... I guess that was before the "Tracks" revamp at Treehouse.
Logan R
22,989 PointsI personally think JS is kinda worthless. I would learn JQuery and/or Ajax and I would suggest giving PHP a try to see if it's any better.
Michael Hulet
47,913 PointsjQuery and AJAX are nothing but JavaScript frameworks. When you're using them, you're using JavaScript
Logan R
22,989 PointsI am aware they are libraries, but still. You can do the same thing with jQuery as you can with just plain old JS, but it will take you a lot more code to do it in JS.
Dino Paškvan
Courses Plus Student 44,108 PointsAs someone who earns his living from JavaScript, I can admit that a lot of seemingly negative things can be said about JavaScript: it can be confusing, it can be complicated, it often acts differently from what you're used to in other programming languages, browser idiosyncrasies can cause a lot of problems, sometimes it's counterintuitive, its name is confusing and so on.
However it's anything but worthless. JavaScript, for better or worse, has become de facto lingua franca of the web. No other language has ever achieved such market penetration.
It's available in any modern (and not so modern) browser, making it practically the only programming language you can be sure is found on any computer (device). It's often used for scripting inside applications that aren't browsers. In fact, when OS X Yosemite is finally released, you'll be able to use JS for scripting on the OS level.
If you take the time to really understand JavaScript, it's an extremely rewarding experience. It's a powerful language that borrows a lot from functional programming patterns. It's object-oriented in a way that no other modern programming language is (forgoing classes and letting the developers interact with the objects directly).
It can be used both client-side and server-side, and in conjunction with databases that use JavaScript for interaction, you can produce whole web apps in a single programming language.
Most of the negative things that I've listed in the first paragraph of this post are actually subjective opinions belonging to developers who have entered the JavaScript world with some preconceived notions about the language. Historically, JavaScript has rarely been a first programming language for developers, so they often had issues when it looked like a language they were used to, but behaved in a different manner.
jQuery has done a lot of good things for the web, but sometimes I think it's done a lot of wrong to JavaScript, too.
The idea that jQuery can help you reduce the amount of code was certainly true 7 years ago, when browsers had poor support for certain technologies.
We live in a different time now, though. Thanks to increased compatibility and rapid development (and excellent work from browser dev teams), vanilla JavaScript has become more efficient in terms of the amount of lines of code.
And, it's always been more efficient computationally speaking, after all, you don't have the overhead of an almost-100kB library (the size of production jQuery uncompressed).
I think a lot of the "jQuery is more efficient and saves me time" statements are a result of poor understanding and sometimes outright laziness on the part of developers.
In any advanced web app, even if you use jQuery, you won't be using it for everything. It often obfuscates what's truly happening with your code, at times it still doesn't act the way you'd expect vanilla JS to act, and sometimes, it can even be too slow.
i don't want to sound harsh, but I believe that dissing a programming language, while recommending a library built on top of the same language shows a great lack of understanding of that language and development in general.
Also, AJAX is not a library, it's a group of technologies centred around the asynchronous nature of JavaScript, through the use of the XMLHttpRequest API which is available as an object with the same name inside of JavaScript (defined as a property of the global window object).
I apologise if I sounded too harsh, but some of these misconceptions have been deeply rooted in the web development community and it's up to us to eradicate them, creating a better working environment for all of us.
Logan R
22,989 PointsWell thank you Dino Paškvan. That was actually very imformative. I will definitely keep that all in mind. I've never heard an actually good or compelling argument as to why using JavaScript is a good language or is better than jQuery, other than "It's useful because apps! / It's good to learn...because...yeah." or such.
I didn't think it sounded harsh :) Just truthful.
Dustin Matlock
33,856 PointsThere's a really good answer on Stack Exchange on this very complex question.
Seth McCombs
16,767 PointsHey Shaun Kelly , I felt the same way when I first started with Javascript, learned JQuery was a big help, while it is a Javascript framework, I found that it helped it all sink in. What Dustin Matlock said I couldn't agree more with, learn it. Take a break. Walk away, and come back, things will start to make more sense, this was at least the case in my instance.
And the two books he has recommended are wonderful resources, I recommend them as well, and of course, the forum is always here for any questions, we'll always try to help!
Shaun Kelly
35,560 PointsThanks for your advice all!